View Single Post
Old 12-07-2012, 05:49 PM   PM User | #1
gal007
New to the CF scene

 
Join Date: Dec 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
gal007 is an unknown quantity at this point
Question How to force plugin charset/encoding?

Hi! I'm having a trouble with my mobile plugin: it shows me the new elements added by scripting with a different charset of the page. E.g. I can read "cuadrúpedo" but the same word in my plugin show "cuadr¡pedo".

I tryed writing the next line to the beginning of my plugin, but it didn't work:
Code:
document.getElementsByTagName("html")[0].setAttribute("lang", "es");
Then, I wrote a "converter function" which replaces the special characters with unicode, like the next line, bub it didn't work.
Code:
str.replace( /ú/g, "/xfa־" );
What can I do?
gal007 is offline   Reply With Quote