Locale/UTF8 problem in firefox

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Wed Sep 5 01:05:08 UTC 2007


Hi all,

   I've got an odd problem with firefox. I have a form that a user can 
enter text into. On save, this is stored in a PostgreSQL database set to 
UTF-8 (SET client_encoding = 'UTF8';).

   The problem is, if I enter a UTF8 string like:

二本五 test.

   I can see it in the database as:

nmc=> SELECT dom_admin_note FROM domains WHERE dom_id=2;
  dom_admin_note
----------------
  二本五 test.
(1 row)

   And when I print it to SYSLOG I see:

[Tue Sep  4 20:55:24 2007] ga.cgi: ga.lib: 388; 'dom_admin_note': [二本 
五 test.]

   But Firefox shows it as:

<!-- ga.lib 389 'dom_admin_note': [二本五 test.] -->
二本五 test.

   First line is viewed in the document source, the second as it appears 
in the forms 'textarea' field. This is a problem in itself, but doubly 
so because if a user changes something else, this mangled string gets 
saved over the good string.

   Has anyone else here seen a problem like this? Any idea what's going 
on? My system's locale is 'en_CA.utf8', in case it matters. This error 
happens even after having cleared the mangled text, re-entered the 
Japanese text, resaved and redisplayed.

   Thanks all!

Madi

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list