utf8 - > ascii在c语言? [英] utf8 -> ascii in c language??

查看:98
本文介绍了utf8 - > ascii在c语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个类,它可以从字符串中读取一行(\\\\ nn结束),当我从utf8字符串读取行时,我不能得到任何东西!

也许我应该将utf8转换为ascii ??有任何功能可以

将utf8转换为ascii?非常感谢你的帮助!!

i have a class, it can read one line(\r\n ended) from string,when i
read line from utf8 string i can''t get any thing!
maybe i should conversion utf8 to ascii??there is any function can
conversion utf8 to ascii? very thanks to your help!!

推荐答案

2005年2月6日00:18:24 -0800," chunhui_true" < ch ********* @ gmail.com>

在comp.lang.c中写道:
On 6 Feb 2005 00:18:24 -0800, "chunhui_true" <ch*********@gmail.com>
wrote in comp.lang.c:
我有一个班级,它可以从字符串中读取一行(\\\\ nn结束),当我从utf8字符串读取行时,我无法得到任何东西!


没有类这样的东西。在C.也许你正在大厅里寻找

comp.lang.c ++。


请注意,C和C ++都是区分大小写的语言,所以你已经

更好地学习如何使用键盘上的shift键。

也许我应该将utf8转换为ascii ??有任何功能可以转换utf8到ASCII?非常感谢你的帮助!
i have a class, it can read one line(\r\n ended) from string,when i
read line from utf8 string i can''t get any thing!
There is no such thing as a "class" in C. Perhaps you are looking for
comp.lang.c++ down the hall.

Note that both C and C++ are case sensitive languages, so you had
better learn how to use the shift key on your keyboard.
maybe i should conversion utf8 to ascii??there is any function can
conversion utf8 to ascii? very thanks to your help!!




没有ascii这样的东西。有ASCII,以美元信息交换代码命名。
美国信息交换代码。但无论是C还是C ++

都没有定义或要求任何特定的字符集,既不是ASCII也不是UTF8

也不是任何其他字符集。


所以最有可能comp.lang.c ++也不想要你的问题。你需要一个支持你的特定编译器/操作系统的组

组合,但是你通过Google发布我没有信息

向你推荐一个。


你需要学习如何使用你的班次键。和空格键。


-

杰克克莱恩

主页: http://JK-Technology.Com



comp.lang的常见问题解答。 c http://www.eskimo.com/~scs /C-faq/top.html

comp.lang.c ++ http://www.parashift.com/c++-faq-lite/

alt.comp.lang.learn.c-c ++
http://www.contrib。 andrew.cmu.edu/~a...FAQ-acllc.html



There is no such thing as "ascii". There is ASCII, named for the
American Code for Information Interchange. But neither C nor C++
define or require any specific character set, neither ASCII nor UTF8
nor any other.

So most likely comp.lang.c++ won''t want your question either. You
need a group that supports your particular compiler/operating system
combination, but since you posted through Google I have no information
on which to suggest one to you.

And you need to learn how to use your shift key. And the space bar.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html


chunhui_true写道:
chunhui_true wrote:
我有一节课,它可以从字符串读取一行(\\\\ nn结束),当我从utf8字符串读取行时我不能得到任何东西!
也许我应该将utf8转换为ascii? ?有任何功能可以
将utf8转换为ascii?非常感谢你的帮助!
i have a class, it can read one line(\r\n ended) from string,when i
read line from utf8 string i can''t get any thing!
maybe i should conversion utf8 to ascii??there is any function can
conversion utf8 to ascii? very thanks to your help!!




我建议把每个字符串的字节写成一个数字,并将

作为文本值写入你可以看到他们。您可能会发现这是一个

的情况,并不像看起来那么困难。


-Chris



I would recommend writing the bytes of each string out as a number and
as a text value so that you can see them. You might find that this is a
case where it isn''t as difficult as it seems.

-Chris


感谢您的建议。我的英语非常差。我首先使用

组,所以我不会在团体中知道这种文化。尽管如此时间我想我可以很好地相互沟通。

Thanks for your suggestion.My English is very poor.And I first use
groups, So I don''t konw the culture in groups.Though the time I think I
can communicate with each other very well.


这篇关于utf8 - &gt; ascii在c语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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