Flash中与xml交互时不显示中文或显示乱码的解决办法 - zzwind's Blog

Flash中与xml交互时不显示中文或显示乱码的解决办法

zzwind posted @ 2010年4月25日 00:01 in Flash , 957 阅读
lovefang

 1、去掉所有System.useCodepage = true;


很多人都说显示不出中文用这个代码,System.useCodePage = true;   是使用系统编码 不是消除乱码,如果系统是 gb2312 你load的也是 gb2312 那么 这样就不会乱码了,但是如果load有韩文怎么办??结果就是 仍然乱码。

2、XML用UTF-8编码,文件保存也用UTF-8编码
统一用utf-8的编码,可以正常显示中文,又不会因为有英文或其他字符出现乱码,除非有特殊需要,否则最好就用这个编码,这是个好习惯。

3、动态文本是不是嵌入字符了?
选中fla中无法正常显示中文的动态文本,点击属性面板的"嵌入"按钮,打开嵌入面板,发现设置了嵌入字符,点击嵌入面板左下角的"不嵌入"按钮..
PS:很多人实在显示不出中文,就嵌入中文,这种业余办法很有效,不过很大的弊端就是你的flash文件膨胀了好几倍,这个方法实在不可取!

4、检查文本框字体是否支持显示中文
很多人都是拿国外源码改的,针对以上几点做了修改后,发现还是无法显示,细心的朋友可以看一下文本使用的字体是否支持中文,所以建议改成“宋体”或者是“Arial”之类的标准字体!

Avatar_small
CBSE Question Paper 说:
2022年9月27日 19:43

All the Central Board of Secondary Education Students of Chennai Scheme, Delhi Scheme and All India Scheme can download the Sample Paper Suggestions with Model Papers along with Previous Years old Exam Solved Question Bank for all Languages & Subjects of the Course. CBSE Question Paper All the Central Board of Secondary Education Students of Chennai Scheme, Delhi Scheme and All India Scheme can download the Sample Paper Suggestions with Model Papers along with Previous Years old Exam Solved Question Bank for all Languages & Subjects of the Course.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee