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
    462
    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!! DHCreationStation.com
    ------------------------------------------------------------
    For projects using MediaTypes (MIMETypes) visit E-BAM.net -(updated weekly)

    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,398
    Thanks
    12
    Thanked 570 Times in 563 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
    462
    Thanks
    0
    Thanked 20 Times in 20 Posts
    Thanks devnull69 I'll try it!
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    For projects using MediaTypes (MIMETypes) visit E-BAM.net -(updated weekly)

    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.


  •  

    Posting Permissions

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