External JS file with different encoding

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

External JS file with different encoding

Post by shiznatix »

I have a website that includes an external JS file which loads a list of TV channels in Sweden. This is fine and all but my website is in UTF-8 while the external JS file is returning everything in the localized Swedish encoding.

This is turning all of the ä and ö and other accented characters into the ? things. Obviously this is not the intended result and I would prefer to keep everything UTF-8 because it makes the most sense but I need to get these characters to show correctly. How can I either change the encoding of the returned data from the JS file or display the page using 2 types of encoding?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: External JS file with different encoding

Post by Weirdan »

User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Re: External JS file with different encoding

Post by shiznatix »

thanks! works perfectly
Post Reply