1 |
Hi everyone, |
2 |
|
3 |
I've been working rather extensively trying to get all languages to work |
4 |
properly on my system with squirrelmail. |
5 |
|
6 |
I am using Gentoo, PHP 5.1.1, and Squirrelmail 1.4.6-release. For testing |
7 |
simplicity, it is simply a stock release from the Squirrelmail website, with |
8 |
all_locales added. |
9 |
|
10 |
I have rebuilt PHP about 14 different ways trying to get things to work to no |
11 |
avail - here's what I've determined: |
12 |
|
13 |
Gentoo has an "nls" USE flag, which if used, makes the PHP package dependant |
14 |
upon gettext, and enables building of both gettext and mbstring as shared |
15 |
extensions for PHP. |
16 |
|
17 |
|
18 |
If the "nls" USE flag is disabled, selecting another language in |
19 |
Squirrelmail's Display Options works. However, if Japanese is selected, |
20 |
warnings are shown about needing mbstring (although Japanese text *is* |
21 |
shown), and mail cannot be viewed because of the errors, though a folder list |
22 |
and mail index is shown, and one can browse the options pages, etc. all in |
23 |
Japanese but with the warning at the top. |
24 |
|
25 |
If the "nls" USE flag is enabled, selecting another language does absolutely |
26 |
nothing, although the output encoding is changed to whatever is appropriate |
27 |
for that language. Furthermore, if Japanese is selected, the subject lines |
28 |
in the message index are all truncated shorter than normal, with characters |
29 |
such as # and & shown before the '...'. |
30 |
|
31 |
I have written a small test script (UTF-8 encoded) that verifies mbstring is |
32 |
working: |
33 |
<?php |
34 |
ini_set ('mbstring.internal_encoding', 'UTF-8'); |
35 |
mb_http_output('ISO-2022-JP'); |
36 |
ob_start('mb_output_handler'); |
37 |
print 'This is a PHP file.'; |
38 |
print 'ログイン中メールをチェック'; |
39 |
?> |
40 |
|
41 |
I can successfully view this file in a web browser and verify that the |
42 |
encoding is actually ISO-2022-JP. |
43 |
|
44 |
|
45 |
I normally use the Hardened-PHP patch and a number of other USE flags, however |
46 |
for the purposes of trying to get to the bottom of this, I built a PHP |
47 |
instance with no USE flags whatsoever, and then enabled only what |
48 |
Squirrelmail complained about needing - namely session and pcre support. |
49 |
This made no difference. |
50 |
|
51 |
|
52 |
I also have a hacked-up version of squirrelmail that's been made to use UTF-8 |
53 |
internally and as the output charset for all languages - it breaks in the |
54 |
exact same way. While it does seem to work just fine, even for Japanese, |
55 |
without the mbstring PHP extension, I've been told by somebody on the |
56 |
squirrelmail-devel list that I need to use mbstring or there will be problems |
57 |
- i.e. the line length on outbound messages will be wrong. |
58 |
|
59 |
|
60 |
Please let me know any suggestions you may have, as I'd like to get this |
61 |
working proper... |
62 |
|
63 |
Cheers, |
64 |
-- |
65 |
Casey Allen Shobe | cshobe@×××××××××××××.com | 206-381-2800 |
66 |
SeattleServer.com, Inc. | http://www.seattleserver.com |
67 |
|
68 |
-- |
69 |
gentoo-web-user@g.o mailing list |