Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Posts
    429
    Thanks
    0
    Thanked 20 Times in 20 Posts

    Language characters in string creating js errors

    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.

    German




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













    spanish


















    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!
    NO Limits!! www.dhcreationstation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,355
    Thanks
    11
    Thanked 558 Times in 551 Posts
    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")

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Posts
    429
    Thanks
    0
    Thanked 20 Times in 20 Posts
    Thanks devnull69 I'll try it!
    NO Limits!! www.dhcreationstation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •