[英]How to use unicode in haxe?
How to use unicode characters in haxe 3? 如何在haxe 3中使用unicode字符?
I tried this example: 我试过这个例子:
trace("Haxe is great :)"+"\u0600");
But, it will not work, I get this error: 但是,它不起作用,我收到此错误:
character 29 : Invalid escape sequence
So, how would I add unicode strings? 那么,我将如何添加unicode字符串? Here is where to try it: http://try.haxe.org/#be311 在这里尝试它: http : //try.haxe.org/#be311
Why not just paste the unicode character? 为什么不只粘贴unicode字符? It seems to work for me 看来对我有用
Look at this http://try.haxe.org/#38E77 看看这个http://try.haxe.org/#38E77
edit: relevant code in case try.haxe stops working: 编辑:有关代码,以防try.haxe停止工作:
trace("Haxe is great :)"+"本");
You should be able to just use the character itself: 您应该能够只使用角色本身:
trace("Haxe is great :) ␆" );
But whether or not that's feasible depends on your usage. 但是,是否可行取决于您的用法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.