Locale/UTF8 problem in firefox

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Wed Sep 5 13:48:55 UTC 2007


Lennart Sorensen wrote:
>>   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';).
> 
> Is your web server sending the header to indicate the page is in UTF-8?
> You can check by asking the browser for the page properties I believe
> (or just check which character encoding it is currently using).  If the
> web server (or php script perhaps in this case) is sending the right
> headers then it should just work.
> 
> Of course the other question is what format are you telling postgres
> that your queries are in?  Is the database configured to operate in
> UNICODE mode?

Hi Len,

   The DB is set to 'UTF8' encoding (see above). I am using perl, and 
when I print the header I do:

eval 'use CGI::Carp "fatalsToBrowser"';
print "Content-type: text/html\n\n";
	
# Tell perl that we are printing UTF8
binmode STDOUT, ":utf8";

   But I will try changing to:

print "Content-type: text/html; charset=utf8\n\n";

   <runs off to test> ... Nope, still screwed up. :(

  Here is what 'lynx -head http://localhost' shows:

HTTP/1.1 200 OK
Date: Wed, 05 Sep 2007 13:47:08 GMT
Server: Apache/2.2.3 (Ubuntu)
Last-Modified: Wed, 18 Jul 2007 15:49:47 GMT
ETag: "19018e-ea-a4b69cc0"
Accept-Ranges: bytes
Content-Length: 234
Connection: close
Content-Type: text/html; charset=UTF-8

   I'll play around some more with the 'charset' command (and by play, I 
mean "google". :) ). Any idea what I might be screwing up still? I'll 
also pull the head meta tag, too.

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