* [gentoo-web-user] Squirrelmail's i18n broken with PHP's mbstring enabled
@ 2006-02-25 9:45 Casey Allen Shobe
2006-02-25 12:47 ` Casey Allen Shobe
2006-02-25 12:48 ` Casey Allen Shobe
0 siblings, 2 replies; 3+ messages in thread
From: Casey Allen Shobe @ 2006-02-25 9:45 UTC (permalink / raw
To: squirrelmail-devel; +Cc: squirrelmail-i18n, gentoo-web-user, gentoo-server
Hi everyone,
I've been working rather extensively trying to get all languages to work
properly on my system with squirrelmail.
I am using Gentoo, PHP 5.1.1, and Squirrelmail 1.4.6-release. For testing
simplicity, it is simply a stock release from the Squirrelmail website, with
all_locales added.
I have rebuilt PHP about 14 different ways trying to get things to work to no
avail - here's what I've determined:
Gentoo has an "nls" USE flag, which if used, makes the PHP package dependant
upon gettext, and enables building of both gettext and mbstring as shared
extensions for PHP.
If the "nls" USE flag is disabled, selecting another language in
Squirrelmail's Display Options works. However, if Japanese is selected,
warnings are shown about needing mbstring (although Japanese text *is*
shown), and mail cannot be viewed because of the errors, though a folder list
and mail index is shown, and one can browse the options pages, etc. all in
Japanese but with the warning at the top.
If the "nls" USE flag is enabled, selecting another language does absolutely
nothing, although the output encoding is changed to whatever is appropriate
for that language. Furthermore, if Japanese is selected, the subject lines
in the message index are all truncated shorter than normal, with characters
such as # and & shown before the '...'.
I have written a small test script (UTF-8 encoded) that verifies mbstring is
working:
<?php
ini_set ('mbstring.internal_encoding', 'UTF-8');
mb_http_output('ISO-2022-JP');
ob_start('mb_output_handler');
print 'This is a PHP file.';
print 'ログイン中メールをチェック';
?>
I can successfully view this file in a web browser and verify that the
encoding is actually ISO-2022-JP.
I normally use the Hardened-PHP patch and a number of other USE flags, however
for the purposes of trying to get to the bottom of this, I built a PHP
instance with no USE flags whatsoever, and then enabled only what
Squirrelmail complained about needing - namely session and pcre support.
This made no difference.
I also have a hacked-up version of squirrelmail that's been made to use UTF-8
internally and as the output charset for all languages - it breaks in the
exact same way. While it does seem to work just fine, even for Japanese,
without the mbstring PHP extension, I've been told by somebody on the
squirrelmail-devel list that I need to use mbstring or there will be problems
- i.e. the line length on outbound messages will be wrong.
Please let me know any suggestions you may have, as I'd like to get this
working proper...
Cheers,
--
Casey Allen Shobe | cshobe@seattleserver.com | 206-381-2800
SeattleServer.com, Inc. | http://www.seattleserver.com
--
gentoo-web-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-web-user] Squirrelmail's i18n broken with PHP's mbstring enabled
2006-02-25 9:45 [gentoo-web-user] Squirrelmail's i18n broken with PHP's mbstring enabled Casey Allen Shobe
@ 2006-02-25 12:47 ` Casey Allen Shobe
2006-02-25 12:48 ` Casey Allen Shobe
1 sibling, 0 replies; 3+ messages in thread
From: Casey Allen Shobe @ 2006-02-25 12:47 UTC (permalink / raw
To: gentoo-web-user; +Cc: squirrelmail-devel, squirrelmail-i18n, gentoo-server
On Saturday 25 February 2006 09:45, Casey Allen Shobe wrote:
> I've been working rather extensively trying to get all languages to work
> properly on my system with squirrelmail.
...and now I feel quite the idiot, as I finally guessed the solution.
Apparently without mbstring, system locale support doesn't matter, which threw
me off. However the locales you want to work must be supported by libc if
you intend them to work with mbstring.
I previously only had C, POSIX, en_US, and en_US.utf8 locales available on my
system using glibc's userlocales option. I've corrected this and now all is
well. :) Hopefully this info is of use to somebody...
--
Casey Allen Shobe | cshobe@seattleserver.com | 206-381-2800
SeattleServer.com, Inc. | http://www.seattleserver.com
Cheers,
--
Casey Allen Shobe | cshobe@seattleserver.com | 206-381-2800
SeattleServer.com, Inc. | http://www.seattleserver.com
--
gentoo-web-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-web-user] Squirrelmail's i18n broken with PHP's mbstring enabled
2006-02-25 9:45 [gentoo-web-user] Squirrelmail's i18n broken with PHP's mbstring enabled Casey Allen Shobe
2006-02-25 12:47 ` Casey Allen Shobe
@ 2006-02-25 12:48 ` Casey Allen Shobe
1 sibling, 0 replies; 3+ messages in thread
From: Casey Allen Shobe @ 2006-02-25 12:48 UTC (permalink / raw
To: gentoo-web-user; +Cc: squirrelmail-devel, squirrelmail-i18n, gentoo-server
On Saturday 25 February 2006 09:45, Casey Allen Shobe wrote:
> I've been working rather extensively trying to get all languages to work
> properly on my system with squirrelmail.
...and now I feel quite the idiot, as I finally guessed the solution.
Apparently without mbstring, system locale support doesn't matter, which threw
me off. However the locales you want to work must be supported by libc if
you intend them to work with mbstring.
I previously only had C, POSIX, en_US, and en_US.utf8 locales available on my
system using glibc's userlocales option. I've corrected this and now all is
well. :) Hopefully this info is of use to somebody...
Cheers,
--
Casey Allen Shobe | cshobe@seattleserver.com | 206-381-2800
SeattleServer.com, Inc. | http://www.seattleserver.com
--
gentoo-web-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-02-25 12:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-25 9:45 [gentoo-web-user] Squirrelmail's i18n broken with PHP's mbstring enabled Casey Allen Shobe
2006-02-25 12:47 ` Casey Allen Shobe
2006-02-25 12:48 ` Casey Allen Shobe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox