ICU图书馆 [英] ICU library
本文介绍了ICU图书馆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#include < stdio.h >
#include < conio.h >
void main( void )
{
字符 c = 0x61;
printf(" ,c);
getch();
}
输出
a
我已将其修改为
#include < stdio.h >
#include < conio.h >
#include < unicode/uchar.h >
void main( void )
{
UChar c = 0x61;
printf(" ,c);
getch();
}
输出
a
现在,如果我将UCHar c更改为0x90f,我想显示印地文字符
但vc显示其他内容
出了什么问题
请帮助
问候
harshada
选择忽略文本中的HTML"
解决方案
将国际文本写入Windows控制台比应该的要复杂一些.您需要使用 _O_U16TEXT [
使用wchar_t
无法解决问题 它仍然显示smae字符
我想使用ICU库
hi
my code is
#include<stdio.h>
#include<conio.h>
void main(void)
{
char c=0x61;
printf("%c",c);
getch();
}
output
a
i have modified it to
#include<stdio.h>
#include<conio.h>
#include<unicode/uchar.h>
void main(void)
{
UChar c=0x61;
printf("%c",c);
getch();
}
output
a
now if i change the UCHar c to 0x90f i want to display a hindi character
but vc displays some thing else
what is going wrong
please help
regards
harshada
Edit: select "ignore HTML in text"
解决方案
Writing international text to Windows console is a little more complicated than it should be. You''ll need to use _O_U16TEXT[^] flag.
TheUCHAR
type is still only 8 bits wide, so the value0x90f
will be truncated. You should use the WCHAR type thus:
WCHAR wc=0x90f; printf("%C", wc);
the problem is not solved by using wchar_t
it still displays the smae charcter
i want to use the ICU library
这篇关于ICU图书馆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文