Re: squirrelmail problem with unicode content ?

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

 



>
> On Fri, December 8, 2006 20:01, Tomas Kuliavas wrote:
>>>
>>> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
>>>
>>> why is squirrelmail not have this meta tags in the html header ?
>>
>> http://www.w3.org/TR/html4/charset.html#h-5.2.2
>> ----
>> ..conforming user agents must observe the following priorities when
>> determining a document's character encoding (from highest priority to
>> lowest):
>>
>> 1. An HTTP "charset" parameter in a "Content-Type" field.
>> 2. A META declaration with "http-equiv" set to "Content-Type" and a
>> value
>> set for "charset".
>> 3. The charset attribute set on an element that designates an external
>> resource.
>> ----
>>
>> SquirrelMail uses http to set charset information. Meta headers are
>> unreliable, because browsers will follow http headers and some webserver
>> packages add charset headers by default.
>
> okay i got it, but trouble i have is that core squrrelmail does not work
> with
> sql data in unicode, add highbit char into the address book, results is
> that
> output will be unicode to the client and not decoded as unicode :/
>
> text body seems ok with unicode, just not all parts of squirrelamil that
> do work with unicode :/

It is related lack of charset support in PHP Pear DB libraries and complex
charset situation in SquirrelMail. SquirrelMail bug "[1520866] PG utf8"

In order to solve it, interface must be switched to single charset and
Pear DB backend must be replaced with MDB2 or Adodb. Conversion from Pear
DB to Pear MDB2 is simple, but MDB2 charset support was very unstable when
I've tested it. It is possible that issues are solved in later MDB2
versions.

Pear DB libraries can be used with PostgreSQL and latest MySQL versions,
but charsets options must be set in custom sql queries. Those queries are
not standard and depend on selected database.

>>> it confuse firefox if unicode pages is build without it so firefox will
>>> not decode unicode :(
>>>
>>> the fix should be easy to make, no ?

execute MySQL 'SET NAMES' query in abook_database class, open() method,
after portability options are set. If you use standard SquirrelMail
packages and live in Western Europe or US, $this->dbh->query("SET NAMES
'latin1';"); should work with most commonly used translations.

>>> i ask since i install squirrelmail on a new server and this is the only
>>> problem i have found with it :(
>>>
>>> what is the correct languages settings in config.php to use unicode ?
>>>
>>> still on 1.4.8 here so if this is fixed in later versions then i just
>>> need
>>> to upgrade :-)
>>
>> Are you sure that you are reporting issue of standard unmodified
>> SquirrelMail version? Firefox works correctly with SquirrelMail in
>> utf-8.
>
> i wish it did
>
> in the server sql address book i have
>
>
> CREATE TABLE `address` (
>   `owner` varchar(128) collate utf8_unicode_ci NOT NULL,
>   `nickname` varchar(16) collate utf8_unicode_ci NOT NULL,
>   `firstname` varchar(128) collate utf8_unicode_ci NOT NULL,
>   `lastname` varchar(128) collate utf8_unicode_ci NOT NULL,
>   `email` varchar(128) collate utf8_unicode_ci NOT NULL,
>   `label` varchar(255) collate utf8_unicode_ci default NULL,
>   PRIMARY KEY  (`owner`,`nickname`),
>   KEY `firstname` (`firstname`,`lastname`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> COMMENT='Adresse';
>
>
> should this not work with squirrelmail ?

Yes. It can work in SquirrelMail, if default mysql client charset is utf-8
and interface runs in utf-8.

> or is this one here better
>
>
> CREATE TABLE `address` (
>   `owner` varbinary(128) NOT NULL default '',
>   `nickname` varbinary(16) NOT NULL default '',
>   `firstname` varbinary(128) NOT NULL default '',
>   `lastname` varbinary(128) NOT NULL default '',
>   `email` varbinary(128) NOT NULL default '',
>   `label` varbinary(255) default NULL,
>   PRIMARY KEY  (`owner`,`nickname`),
>   KEY `firstname` (`firstname`,`lastname`)
> ) ENGINE=MyISAM DEFAULT CHARSET=binary COMMENT='Adresse';
>
>
> ?

don't know. If you know the way to turn off charset conversion in mysql
libraries, try using it.


-- 
Tomas

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
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