unicode进入应用程序 [英] unicode in to an application
本文介绍了unicode进入应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在用c语言开发的应用程序中实现unicode以实现多语言访问
how unicode can be implemented in to an application, developed in c,for getting multiple language access
推荐答案
您应该依赖UNICODE
对<您的操作系统的c1>,例如Windows API
提供了UNICODE
(UTF-16
,请参见 ^ ]).
You should rely onUNICODE
support of theC API
of your operative system, for instanceWindows API
providesUNICODE
(UTF-16
, see Unicode and Character Sets[^]).
在Linux上,utf8是必经之路.尽管WinNT内部使用utf16,但我也在Windows上使用utf8.即使使用WinNT,utf8也更自然地与C一起使用.在Windows上,我通常在调用Windows函数之前将utf8字符串转换为utf16.大多数C库函数自然可以与utf8字符串一起使用.对于utf16来说,噩梦般始终将"L"放在字符串前面,或者使用_()或TEXT()宏.
On linux utf8 is the way to go. I use utf8 on windows too despite the fact that the internals of WinNT are using utf16. utf8 is more natural to use with C even if you are working with WinNT. On windows I usually convert my utf8 strings to utf16 right before calling windows functions. Most C library functions work naturally with utf8 strings. With utf16 its a nightmare to put ''L'' in front of the strings all the time or using _() or TEXT() macro.
这篇关于unicode进入应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文