Connecting Tech Pros Worldwide Forums | Help | Site Map

Special characters problem in with Prototype Ajax

diverge@styleish.net
Guest
 
Posts: n/a
#1: Nov 10 '06
Hi, i'm working on an ASP project with prototype.js but i just can't
get special chars to work as they should.
I'm using UTF-8 pages but as soon as i call a page containing for
example å,ä,ö, < or it's replaced with a questionmark.
I call the pages using
new Ajax.Updater(target, page, {asynchronous:true, evalScripts:true});
Any ideas?


RobG
Guest
 
Posts: n/a
#2: Nov 10 '06

re: Special characters problem in with Prototype Ajax


diverge@styleish.net wrote:
Quote:
Hi, i'm working on an ASP project with prototype.js but i just can't
get special chars to work as they should.
I'm using UTF-8 pages but as soon as i call a page containing for
example å,ä,ö, < or it's replaced with a questionmark.
I call the pages using
new Ajax.Updater(target, page, {asynchronous:true, evalScripts:true});
Any ideas?
You will get better help on Prototype in the Ruby on Rails Spin-offs
group:

<URL: http://groups.google.com/group/rubyonrails-spinoffs >

--
Rob

Yanick
Guest
 
Posts: n/a
#3: Nov 11 '06

re: Special characters problem in with Prototype Ajax


diverge@styleish.net a écrit :
Quote:
Hi, i'm working on an ASP project with prototype.js but i just can't
get special chars to work as they should.
I'm using UTF-8 pages but as soon as i call a page containing for
example å,ä,ö, < or it's replaced with a questionmark.
I call the pages using
new Ajax.Updater(target, page, {asynchronous:true, evalScripts:true});
Any ideas?
This is not a Prototype problem, and neither is a Javascript one ; I
found out that, when using accented characters (é, è, à, ô, etc.)
ISO-8859-1 work better, as UTF-8 treats those characters as two-bytes
characters, etc.

My two advices for this kind of problem are :

1) try different encodings
2) escape your characters with HTML entitites ; i.g. é = &eacute;, è
= &egrave;


Good luck !

-Yanick

Closed Thread


Similar JavaScript / Ajax / DHTML bytes