多字节字符 [英] multibyte characters
问题描述
如何处理多字节字符,如?,ü(德语元音变异)?
这不是工作:
开关(c)
案例''''':
...一些动作
休息;
案例''ü'':
...一些行动
休息;
....
....
感谢您的帮助。
oo
Thomas
Hi,
how can I handle multibyte characters like ?, ü (german vowel mutation)?
This does''t work:
switch(c)
case ''?'':
... some action
break;
case ''ü'':
... some action
break;
....
....
Thanks for help.
o-o
Thomas
推荐答案
TK< to **** @ web.dewrites:
TK <to****@web.dewrites:
如何处理多字节字符,如?¤,?? (德语元音突变)?
这不行:
开关(c)
case''?¤'':
...一些动作
休息;
case'''''':
...一些动作
休息;
...
...
how can I handle multibyte characters like ?¤, ?? (german vowel mutation)?
This does''t work:
switch(c)
case ''?¤'':
... some action
break;
case ''??'':
... some action
break;
...
...
wchar_t c;
与L''?¤''或L''\ u00e4''。使用UCN(\uxxxx语法)可能更便携。
-
Ben。
wchar_t c;
with L''?¤'' or L''\u00e4''. Using UCNs (the \uxxxx syntax) is probably
more portable.
--
Ben.
Ben Bacarisse写道:
Ben Bacarisse wrote:
TK< to **** @ web.dewrites:
TK <to****@web.dewrites:
>我如何处理多字节字符,如?¤,?? (德语元音突变)?
这不行:
开关(c)
案例''?¤'':
...有些动作
休息;
案例''??'':
......有些动作
休息;
...
...
>how can I handle multibyte characters like ?¤, ?? (german vowel mutation)?
This does''t work:
switch(c)
case ''?¤'':
... some action
break;
case ''??'':
... some action
break;
...
...
wchar_t c;
与L''¤''或L''\ u00e4'。使用UCN(\uxxxx语法)可能更便于使用
。
wchar_t c;
with L''?¤'' or L''\u00e4''. Using UCNs (the \uxxxx syntax) is probably
more portable.
这完全取决于正在使用的字符编码。 wchat_t是
不一定是Unicode字符。
This all depends on which character encoding is being used. wchat_t is
not necessarily a Unicode character.
Gianni Mariani写道:
Gianni Mariani wrote:
>>
与L''?¤''或L''\ u00e4''。使用UCN(\uxxxx语法)可能更具可移植性。
>>
with L''?¤'' or L''\u00e4''. Using UCNs (the \uxxxx syntax) is probably
more portable.
这完全取决于使用的字符编码。 wchat_t是
不一定是Unicode字符。
This all depends on which character encoding is being used. wchat_t is
not necessarily a Unicode character.
并且L''...''不会生成MULTIBYTE字符。它会产生一个宽广的
字符。
And L''...'' doesn''t generate a MULTIBYTE character. It makes a wide
character.
这篇关于多字节字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!