SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict five40's Avatar
    Join Date
    Jul 2001
    Location
    Imatra, Finland
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Special characters and Alert-method

    Normally when writing HTML and I want to display Scandinavian characters, I would write for eg. ä (auml)or ö (ouml) However this doesn't seem to work with JavaScript's Alert-method since those characters get displayed just the same way they are written. Any workarounds available ?
    Last edited by five40; May 20, 2002 at 13:34.
    "-Surely you can't be serious ?
    -Yes I am serious...and don't call me Shirley."

  2. #2
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've done some research, but have found nothing. JavaScript strings containing HTML special characters (such as   © etc.) are not rendered when the alert() function is used.

    However, I don't really see why this is a problem in the first place, since having the foreign characters directly in the string works fine on my UK locale PC:
    Code:
    <SCRIPT>
    alert("дц");
    </SCRIPT>

    M@rco


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
  •