[horde] Maybe a bug, need some help

Jan Schneider jan at horde.org
Wed Dec 17 01:21:42 PST 2003


Zitat von Damien Harper <damien.harper at keops.net>:

> Hi all,
> I solved the problem I encountered (cf thread "French language doesn't
> work
> for me) !
> In fact, I just found a workaround, not a real solution.
> I think something's wrong with horde charset encoding scheme or with my
> setup.
> I installed a fresh horde setup and a fresh horde database and got the
> same
> troubles as before.
> So I took a little time to have a look at horde "nls" php code.
> I found that NLS::getCharset() always returns "UTF-8" on my system even
> if I
> explicitly set it to iso-8859-1 ! I don't know why that happens but
> that's
> reality :-(

Because this is the charset that the output should have. It has nothing to
do with your system's charset.

> I just changed the function (in lib/NLS.php)
>     function getCharset($no_utf = false)
> to
>     function getCharset($no_utf = true)

This is totally wrong, out of the blue and breaks the whole charset support
in Horde.

> If I understood well the meaning of that parameter, Horde tries to use
> UTF-8
> first (by testing if the browser supports UTF-8 => lib/Browser.php) and
> if
> it can't, it tries to identify encoding by identifying language first.
> My system is set to french, iso-8859-1 and my browser (IE6 SP1) supports
> UTF-8. The server Apache2 is set to use iso-8859-1 encoding and Mysql
> too.

The meaning of this parameter is that we want to be able to get the charset
that the *system* actually uses, independent from what *we* use.
This has nothing to do with translations at all.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft



More information about the horde mailing list