Re: utf8 -> ascii in c language??

From: Chris Williams (thesagerat_at_yahoo.co.jp)
Date: 02/07/05


Date: 6 Feb 2005 22:29:35 -0800

chunhui_true wrote:
> 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!!

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



Relevant Pages

  • utf8 -> ascii in c language??
    ... 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? ...
    (comp.lang.c)
  • utf8 -> ascii in c language??
    ... 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? ...
    (comp.os.linux.misc)
  • module OpenOffice::OODoc fails with Unicode characters
    ... When I try to write out a utf8 string using extendText(), appendParagraph or other methods with the OpenOffice::OODoc module, I get the following error: ... I have the localEncoding set to utf8 as I should and it reads in fine from an office document containing utf8 characters. ...
    (comp.lang.perl.misc)
  • How to set the locale::global to utf8 encoding?
    ... I try to set the global locale to "utf8" to let the mbstowcs() ... function works for convert a utf8 string to an wchar_t*. ...
    (microsoft.public.vc.stl)