View Full Version : Language characters in string creating js errors

03-12-2012, 08:22 PM
Ok I changed a '.sql' file to .js to create a file for various languages, however when some some language chars. are placed in a string I mixed errors from my javascript function. Usually 'unterminated string' or 'Invalid procedure call or argument'.

all run through the same function call.


// sometimes this one works in a string without creating errors


So any hints on how to actually use language characters? I've seen some javascripts that have language scripts that go with them and they don't seem to have any problems. Thanks for any help!

03-13-2012, 12:45 AM
Best solution: Keep all of your stuff with the same character encoding. Usually I take utf-8 for this

1. in HTML set the meta tag for charset
2. in PHP files, set the header Content-type
3. most importantly: Make sure all of your source files are having the right character encoding (e.g. for Notepad++ set the encoding to "UTF-8 without BOM")

03-13-2012, 01:16 AM
Thanks devnull69 I'll try it!