如何在xml中显示Ä,Ö,characers? [英] How to display Ä, Ö, characers in xml ?

查看:70
本文介绍了如何在xml中显示Ä,Ö,characers?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XML,我想显示这样的文字,



TAG 3BETALAFÖR2!在xml。

以下是我的代码: -



I have one XML, and I want to display text like this,

"TAG 3 BETALA FÖR 2!" in xml.
Following, is my code:-

<image imageUrl="images/tfile_splash_pic_3.jpg" text="TAG 3 BETALA FÖR 2!" link="#"/>
<image imageUrl="images/tfile_splash_pic_4.jpg" text="TAG 3 BETALA FÖR 2!" link="#"/><image imageUrl="images/tfile_splash_pic_5.jpg" text="TAG SUPERPUMP MAX TEBATL KUN FOR MASS UP 5000G !" link="#"/>







有人可以告诉我如何显示这些特殊字符吗?




Can anybody please tell me how to display those special characters ?

推荐答案

首先,XML支持Unicode,所以你只需要用Unicode UTF编写文件,最推荐使用UTF-8。您还需要在XML序言中规定编码:

First of all, XML supports Unicode, so all you need it to write the file in one of Unicode UTFs, UTF-8 is most recommended. You also need to prescribe the encoding in XML prolog:
<?xml version="1.0" encoding="UTF-8"?>





HTML字符实体也很好,但它们只包含一小组字符。他们更喜欢标点符号,字母符号等,但很少用于字母。



-SA

Html逃脱它们,然后在需要时取消转义;



例如Å变为
Html escape them, and then un-escape where required;

For example Å becomes
Å





这里有完整的字符列表; http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php [ ^ ]



/ Fredrik

.

Full list of characters here; http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php[^]

/Fredrik


尝试使用这个

try to use this
<?xml version="1.0" encoding="ISO8859-2"?>


这篇关于如何在xml中显示Ä,Ö,characers?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆