Results 1 to 5 of 5

Thread: special characters

  1. #1
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default special characters

    i am using javascript to read from XML to automatically populate a email subject and body. i have a special character in the xml - ö
    <![CDATA[Björn Borg]]> (the special character gets converted here)
    but the body of the email keeps coming out like this

    Björn Borg
    but if i copy/paste this ö into outlook its fine

    using outlook as my email client
    any suggestions on how to fix this?
    Last edited by ggalan; 08-25-2011 at 08:49 PM.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You'll need to match character encodings. You could try a few and see if you get it right or you could research what Outlook uses-- probably email in general.

    Copying and pasting is irrelevant because that intermediate step doesn't use an encoding-- when pasting, the encoding of the document is automatically applied to whatever contents you have on the clipboard.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    ggalan (08-25-2011)

  4. #3
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default

    You'll need to match character encodings.
    how do i do this?


    OH, like unicode?

  5. #4
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default

    it seems like javascript picks up the special character code
    Code:
    var1=var1.replace(/&#246;/g,"ö");
    can i do something like this? then what would i replace "ö" with?

  6. #5
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default

    Unicode!!

Bookmarks

Posting Permissions

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