DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Javascript charset

  1. #1
    Join Date
    Jul 2006

    Javascript charset

    Hi there

    One of my clients has got a website in Portuguese language and he wants me to introduce some Ajax on it.
    The pages itself are set up with the writ charset but when I run Ajax script it doesn’t recognise some letters of the Portuguese vocabulary. By example it shows this (�) instead of this (é).
    Is there any way to change the charset on the JavaScript used by the Ajax script?


  2. #2
    Join Date
    Mar 2007
    Bangalore, India
    JavaScript uses 16 bits per character. I don't think that can be changed (and there isn't no need eighter I guess...). It should be able to handle character sets transparently. The problem might be because the page uses one particular charset, but the Ajax response coming from the server is a different one.

    Try using UTF-8 or UTF-16 as the charset in all cases. I don't see any other reason why it shouldn't work. Is it a browser specific issue?

Similar Threads

  1. Replies: 5
    Last Post: 07-24-2009, 09:25 PM
  2. Replies: 0
    Last Post: 03-10-2007, 11:24 PM
  3. Replies: 5
    Last Post: 05-06-2006, 10:22 PM
  4. problems with javascript
    By Michael in forum ASP.NET
    Replies: 10
    Last Post: 11-08-2005, 01:19 PM
  5. Sample Sites.
    By Murray Foxcroft in forum Web
    Replies: 5
    Last Post: 11-02-2000, 03:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center