Display unicode character in Actionscript

这一生的挚爱 提交于 2019-12-24 02:00:10

问题


I have the following unicode for a char:

0x023D2A   

How do I display it using:

textField.text = ???;

I have have the name of the character. Can I reference it by name?


回答1:


Try this:

textField.text = String.fromCharCode(0x023D2A)



回答2:


textField.text = "Adobe\u00ae" should give you "Adobe®". Replace your Unicode as required. (Note: I don't have Flash with me where I am; I am posting the above untested.)




回答3:


Tested whybird's syntax: it works. You can use \u plus the unicode value in hex inside the string.



来源:https://stackoverflow.com/questions/2405618/display-unicode-character-in-actionscript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!