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 Apr 23, 10:01 pm, Walter Lee Davis <[email protected]> wrote: > 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=windows-1252'); > And make sure that any text getting within your CGI is also aware of > the character set of your database. > Personally, I would probably fork out to iconv for this, make it UTF-8 > on the server and serve it that way. > Walter > On Apr 23, 2009, at 7:29 PM, Diodeus wrote: > > > > > Does that mean I'm screwed if the database text is windows-1252? > > > On Apr 23, 2:48 pm, Walter Lee Davis <[email protected]> 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/charset header, or your > >> database is transmogrifying the characters somewhere, or Perl is, > >> then > >> you've got your problem there. I've used the AAC with Greek > >> characters, French accents, I know it works if your entire path is > >> UTF-8. You can try adding the Ajax options detailed here[1], but I'm > >> not sure if it will entirely solve your problem. > > >> Walter > > >> 1.http://prototypejs.org/api/ajax/options > > >> On Apr 23, 2009, at 8:46 AM, Per wrote: > > >>> Hi > > >>> I am trying to add Ajax.autocompleter to an old Perl.cgi + Oracle > >>> application we use. I am looking up people from > >>> our people database, for some person fields, and an email cc list. I > >>> have everything working to my liking, except I have run into two > >>> problems: > > >>> Some of the names in our database, contain French accented > >>> characters > >>> like é and è, and these do not work, as > >>> é is translated to "%C3%A9" in the request sent to the server, and > >>> if > >>> é is sent from the server it is translated to character 0xe9. Is > >>> there > >>> any way to disable this translation? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
