convert an encoded string

D

Deephay

Greetings all,

I have a problem with encode converting:
Say, I have a string here, if I print it to stdout, I will got an ascii
encoded string (locale do not effect), but I know that this string is in
actually in another charset and I tried to use the iconv() to convert
the encoding, but it will always return me the same anwser (the ascii
string). How do I do the converting? thx very much!

ps: I also want to know that what is the scheme to identify the mutibyte
string / char (not the C function calls, just the scheme)

Deephay
 
J

Jack Klein

Greetings all,

I have a problem with encode converting:

Convert what encoding to what?
Say, I have a string here, if I print it to stdout, I will got an ascii
encoded string (locale do not effect), but I know that this string is in
actually in another charset and I tried to use the iconv() to convert
the encoding, but it will always return me the same anwser (the ascii
string). How do I do the converting? thx very much!

I have no idea what iconv() is, it is not a standard C function.
ps: I also want to know that what is the scheme to identify the mutibyte
string / char (not the C function calls, just the scheme)

Deephay

You appear to have a problem with glyphs, that is the visible
representation of characters when they appear on some output device
such as a video terminal or printer. These are not controlled by the
C language, but rather by the operating system and display device.

As for multibyte character encodings, C does not specify what they
are. You might want to look for information on
http://www.unicode.org.
 
D

Deephay

Jack Klein 写é“:
Convert what encoding to what?


I have no idea what iconv() is, it is not a standard C function.
the iconv is a glibc function, a generic encode converting function
You appear to have a problem with glyphs, that is the visible
representation of characters when they appear on some output device
such as a video terminal or printer. These are not controlled by the
C language, but rather by the operating system and display device.
no, I do not have problem with either my fonts or my locales, the string
is actully a two-bytes (or may be three-bytes) character string, but the
C? (System?) recognize it as an ascii string.
I have no idea how to deal with it...
As for multibyte character encodings, C does not specify what they
are. You might want to look for information on
http://www.unicode.org.
thx!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top