I did some more work on it, found out that the database is actually
using ISO-8859-1
character set, and changing the header, I send from perl, actually made
the characters
show correctly in the browser when received by the server.
on the client to server side, I tried changing the encoding option
Are you sending the header on the main page as well as the snippet
you're returning via Ajax? If there's a mismatch between the main body
of the page and the replacement code, that could be another issue.
Look in Firebug at the headers from your initial request for the page
(click on Net,
That's why I recommend you look at taking the output from the
database, passing it through iconv on the server to transcode it from
1252 to UTF-8, and then serving it as UTF-8, which the browser will
love you for. This is desperately easy in PHP, probably equally so in
Perl.
$string = ico
I was under the impression that encoding: set the request encoding,
not the response.
Yup, I'm sending out the 1252 header but I'm still getting broken
accented characters. I'd like to make it UTF-8 all the way, but the
client's data was written using Word and is already in the database. :
(
On
I don't know. Did you try setting the option in the Autocompleter?
var options = { encoding: 'window-1252' }
new Ajax.Autocompleter(id_of_text_field, id_of_div_to_populate, url,
options);
Also, in your CGI, set the header before you send any results:
header('Content-type: text/html; charset=wi
Does that mean I'm screwed if the database text is windows-1252?
On Apr 23, 2:48 pm, Walter Lee Davis wrote:
> Is your entire path to and from the database UTF-8? That's a huge
> requirement of Prototype's Ajax implementation, so if you are sending
> back data under the wrong Content-type/ch
Is your entire path to and from the database UTF-8? That's a huge
requirement of Prototype's Ajax implementation, so if you are sending
back data under the wrong Content-type/charset header, or your
database is transmogrifying the characters somewhere, or Perl is, then
you've got your prob