Solved

JSON object ok, but then UTF-8 characters fail

Posted on 2013-11-06
3
544 Views
Last Modified: 2013-11-25
I have a JSON object that looks ok in the browser (chrome with utf-8 "mode").

When I use the web-application it seems that the javascript mess up the UTF-8 characters and i get a questionmark with a whitish diamond surrounding it.

What do I need to do in the javascript to handle a json object correctly regarding encoding?
0
Comment
Question by:mdoland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 39627060
please provide a link
0
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 500 total points
ID: 39627114
Is the character messed up when it comes back from your request, or just when you inject it into the DOM?

You need to make sure your HTML page has a valid character set, i.e. utf-8. In the head of your page, make sure you have this:

<meta charset="utf-8">
0
 

Author Comment

by:mdoland
ID: 39627363
I have <meta charset="utf-8"> in myhtml files. I still investigate where the error seems to happen. When I do a get on the URL that returns the JSON, it looks fine.

I will get back when I know more.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question