[horde] Re: Maybe a bug, need some help

Damien Harper damien.harper at keops.net
Wed Dec 17 06:31:48 PST 2003


Hi,
As soon as I let this parameter default to false, I get many javascript
errors on pages that contain accents (é, è, ê, à, û) and display errors !
In fact, everything I type in input fields is properly UTF-8 encoded and
saved as is in the database (MySQL) even if I set the mysql driver
config/conf.php)  to use iso-8859-1.
Here is an example within whups admin :
* I create a ticket type (type name : Nouvelle fonctionnalité / type
description : Nouvelle fonctionnalité)
* I create the default states (creates states with accents : Nouveau,
Assigné, Accepté, Non confirmé, Résolu, Terminé)
    => state names are displayed comma separated and I can't see any accent
but weird/chinese characters
* I edit the new type I just created
    => type name and description are displayed in input fields, evrything is
OK
    => state names are displayed comma separated and I can't see any accent
but weird/chinese characters
Now if I look in the database (whups_types), every state name and
description were UTF-8 encoded

So why when displaying UTF-8 encoded data on a system that supports UTF-8 I
get these weird/chinese characters ?

If not a bug, I suppose that I haven't properly configured my system, any
clue ?
RedHat 8
PHP 4.2.2
MySQL 4.0.16
Horde CVS (using latest HEAD snapshots)

Regards,

Damien Harper

"Jan Schneider" <jan at horde.org> a écrit dans le message de
news:20031217102142.ulgkwccgwwskokgk at neo.wg.de...
> 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
>
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>






More information about the horde mailing list