宽字符与ANSI字符 [英] Wide char vs. ANSI char

查看:103
本文介绍了宽字符与ANSI字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想为我的软件添加广泛的字符支持.如果这样做,我将需要更改很多代码.如果将软件更改为Wide char,此Wide char软件是否可以像以前一样处理ANSI char?

有什么建议或良好的经验吗?

谢谢,

Hi

I want to add wide char support to my software. If I do this, I will need to change a lot of code. If the software is changed to wide char, does this wide char software can handle ANSI char as it used to be?

Is there any advice or good experience?

Thanks,

推荐答案

请参阅[
See [^].
:)


我不确定处理" ANSI字符是什么意思.请注意,在为Unicode构建的应用程序中,所有内容均以Unicode表示. CP上有两部分,您可能需要阅读:
《 C ++字符串完整指南》,第一部分-Win32字符编码 [ ^ ]
《 C ++字符串完整指南,第二部分-字符串包装类》 [ ^ ]

如果您编写了在ANSI应用程序中,Windows仍必须在内部将所有内容都转换为Unicode才能使用它.因此,理论上,如果您的应用程序是为Unicode构建的,则必须更快.

I am not sure what do you mean by "handle" ANSI char. Note that everything is represented as Unicode, in an application that is built for Unicode. There is a two part article at CP, that you might want to read:
The Complete Guide to C++ Strings, Part I - Win32 Character Encodings[^]
The Complete Guide to C++ Strings, Part II - String Wrapper Classes[^]

Also, if you write an application in ANSI, Windows will still have to convert everything to Unicode internally to work with it. So, theoretically your application must be faster if it is built for Unicode.


这篇关于宽字符与ANSI字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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