JSON特殊字符转换 [英] JSON Special Character conversion
问题描述
I'm trying to insert the returned JSON data from http://cdn.content.easports.com/fifa/fltOnlineAssets/C74DDF38-0B11-49b0-B199-2E2A11D1CC13/2014/fut/items/web/16.json into a table but the LastName field is returned as "LastName":"GarcÃa Fernández" in a browser but if I save the JSON file and open it in notepad then the LastName is displayed as "LastName":"García Fernández" - which is the way I'd want to insert it into the field.
任何人都知道如何将这些特殊字符转换为应有的样式吗?
Anyone know how I can convert these special characters to get them the way they should be?
推荐答案
这听起来像是一个字体问题,在您的代码内的浏览器中加载了免费的多语言或unicode支持字体.
It sounds like a font issue, load a free multilingual or unicode supporting font in the browser within your code.
如果这不是问题,因为您的字体显然支持这些字符,请检查您的html
中的文件格式,例如,它是UTF-8吗?发生在什么浏览器和版本中?也可能需要发布一些代码.
If that is not the issue because your font is clearly supporting these characters then check the file format in your html
, is it UTF-8 for instance? And what browser and version does this happen in? It may be necessary to post some code too.
平均字体(和字体后备)似乎无法识别字符似乎不太可能,例如甚至 OpenSans 支持它们.如果仅是字体问题,则下面列出了一些问题.
It seems a bit unlikely that the average font (and font fallbacks) would fail to recognize the characters, for example even OpenSans supports them. If it is simply a font issue, some are listed below.
免费的多语言字体包括
- PT Mono,Sans和Serif
- 字体多语言字体
- DejaVu
- Molengo
- 创建自己的字体是一个自定义字体生成器,您也可以使用
- PT Mono, Sans and Serif
- Fontface multilingual fonts
- DejaVu
- Molengo
- Create your own font is a custom font generator which you could use too
这可以使用这些说明
这篇关于JSON特殊字符转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!