ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] Squirrelmail и ошибка декодирования.
@ 2004-09-28  6:30 Evgeniy Kobzev
  2004-09-28  7:04 ` Evgeniy Kobzev
  0 siblings, 1 reply; 2+ messages in thread
From: Evgeniy Kobzev @ 2004-09-28  6:30 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussion list

Тут пролетала как то эта тема, и предлагался грязный хак путем 
комментирования следующих строчек в 
/var/www/html/squirrelmail/functions/decode/*.php

#if (! ereg("[\200-\237]", $string) and ! ereg("[\241-\377]", $string) )
#  return $string;

На самом деле всё гораздо прозаичнее.
Используется функция ereg(), а она не может работать с юникодом.
Чтобы она смогла понимать юникод, нужно включить "Multi-Byte String 
Functions", а чтобы их включить, нужно установить php-mbstring.
И ещё поставить нужное значение параметру mbstring.func_overload
в /etc/php/<version>/mod_php/php.d/mbstring.ini
например:
; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.
; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions
mbstring.func_overload = 7

Таким образом делаем вывод:
squirrelmail с русским языком без установки php-mbstring работать не будет.

Может в зависимости?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sisyphus] Squirrelmail и ошибка декодирования.
  2004-09-28  6:30 [sisyphus] Squirrelmail и ошибка декодирования Evgeniy Kobzev
@ 2004-09-28  7:04 ` Evgeniy Kobzev
  0 siblings, 0 replies; 2+ messages in thread
From: Evgeniy Kobzev @ 2004-09-28  7:04 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussion list

Ещё в догонку.
В mbstring.ini

mbstring.internal_encoding = UTF-8

без этого заголовок и тело письма крякозяблами покажет, а

mbstring.func_overload = 4

если 7 поставить - будут проблемы с функциями str*()


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-28  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-28  6:30 [sisyphus] Squirrelmail и ошибка декодирования Evgeniy Kobzev
2004-09-28  7:04 ` Evgeniy Kobzev

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git