Re: Problem replying or forwarding for non-ISO-8859-2 mesages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> > This problem happens also for Windows-1250 charset, which is almost
>> > identical to ISO-8859-2.
>>
>> If you reply to cp1250 email, only non-identical characters are broken
>> in default SquirrelMail configuration.
>
> The problem here is that cp1250 and ISO-8859-2 contain the same
> characters, but
> with different hex. codes . So the text becomes broken. Why don't you
> use e.g. iconv
> to convert between cp1250 and ISO-8859-2 to achieve proper conversion
> without loss ?

SquirrelMail does what it can. Just turn on $lossy encoding and cp1250
will be converted to iso-8859-2. But cp1250 and iso-8859-2 are not
compatible. If I remember correctly, cp1250 is superset of iso-8859-2.
iso-8859-2 does not support characters available in cp1250. conversion is
not lossy only from iso-8859-2 to cp1250.

There are four different charset conversion functions in PHP. recode is
not available on most hosts due to conflicts with mysql extension. iconv
extension is not stable. mbstring provides limited character set support
and depends on PHP version/compilation options. XML extension has even
more limitations. SquirrelMail uses own conversion functions for single
byte character sets. recode/iconv/mbstring is used only for multibyte
character sets (excluding utf-8).

>> n years ago SquirrelMail i18n developers asked translators to switch to
>> UTF-8.
>> Only one translator switched. SquirrelMail developers allowed
>> translators to
>> keep their selected character sets and haven't forced mass conversion to
>> utf-8.
>> We live in a free world.
>
> Are you saying that charset of outgoing emails must be the same as the
> charset used for translation ? I.e. if I convert Czech translation
> files into UTF-8, will Squirrelmail start using
> UTF-8 for all outgoing email ?

Yep.

Replies will use utf-8 and work fine with iso-8859-2, windows-1250 and
other charsets, if incoming mails follow MIME formating standards.

If you want to use html mail plugin, then you will have to fix
my_html_entity_decode() function.

> Could you please provide the exact list of files which need to be
> converted, or better yet, has anyone developed some automatic way to
> do this?

There is SquirrelMail 1.4.8.utf8-1 package, but it does not include
updates from 1.4.10a.

Fedora packages are converted to utf-8. Only CJK translations kept their
character sets.

If you want to convert Czech to utf-8

1. convert locale/cs_CZ/LC_MESSAGES files
.po files can be converted with gettext msgconv utility.
.mo files are binary and compiled from .po files with msgfmt utility.

msgconv -t utf-8 squirrelmail.po -o squirrelmail-utf8.po
mv squirrelmail.po squirrelmail.old
mv squirrelmail-utf8.po squirrelmail.po
msgfmt -v -c -o squirrelmail.mo squirrelmail.po


2. fix functions/i18n.php

Find
----
$languages['cs_CZ']['NAME']    = 'Czech';
$languages['cs_CZ']['CHARSET'] = 'iso-8859-2';
$languages['cs_CZ']['LOCALE']  =
array('cs_CZ.ISO8859-2','cs_CZ.ISO-8859-2','cs_CZ');
$languages['cs']['ALIAS']      = 'cs_CZ';
----

Update them to
----
$languages['cs_CZ']['NAME']    = 'Czech';
$languages['cs_CZ']['CHARSET'] = 'utf-8';
$languages['cs_CZ']['LOCALE']  = array('cs_CZ.UTF8','cs_CZ.UTF-8','cs_CZ');
$languages['cs']['ALIAS']      = 'cs_CZ';
----

3. make sure that you have cs_CZ.UTF-8 system locale. 'locale -a' shows
all available locales on Linux.

4. restart webserver processes

5. check if translations starts working in utf-8

6. convert help system (help/cs_CZ) to utf-8. You can do that with recode
or iconv utilities on Linux.

Please keep conversation on mailing list and don't reply to my email
address with personal questions about SquirrelMail. I am not SquirrelMail
developer and I prefer to keep all conversations about SquirrelMail
public.


-- 
Tomas


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
--
squirrelmail-users mailing list
Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux