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 2 2015
On Mon, 10 Apr 2006 21:22:30 +0800, Deephay <tu*****@gmail.com> wrote
in comp.lang.c: 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.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
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
Jack Klein 写道: On Mon, 10 Apr 2006 21:22:30 +0800, Deephay <tu*****@gmail.com> wrote in comp.lang.c:
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.
the iconv is a glibc function, a generic encode converting 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.
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! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: joe_rattz |
last post by:
I need to convert a text string ("Dewey & Cheatham & Howe") to an XML encoded string ("Dewey & Cheatham & Howe"). I am not building an XML document, I am just trying to convert a single string. I...
|
by: Alessandro |
last post by:
Hi !
I have a big problem, i'm using XMLdocument to add elements to a XML file.
Elements are like this:
<name>Paolo</name>
<comment>this is <a comment></comment>
<description>In italian "is"...
|
by: Gator |
last post by:
Hi All,
Basically my situation is this, I have a server implemented in C++,
unmanaged code, using proprietery protocol over TCP/IP to communicate
with the cilent(c++ also).
Now, I am implementing...
|
by: Albert Jan |
last post by:
Hi,
I have text from mime email messages with different encoding that I want to
convert to utf-8, but I'm relatively new on encoding problems.
I use the following code, but this doesn't seem...
|
by: Albert Jan |
last post by:
Hi,
in my quest to properly display email messages I have overcome the problem
of decoding strings like
"=?GB2312?B?s8q5q8u+vq3A7aGissbO8bK/w8W1xNK7t+LQxQ==?="
(which appears to be an...
|
by: Joey Lee |
last post by:
Hi,
Does anyone know how I am able to write a utf-8 encoded binary string into
binary file?
Currently I am given a UTF-8 string which was read from a gif image.
Here are my functions...
...
|
by: hb |
last post by:
Hi,
Would you please give me some idea to convert/decode a Base 64 encoded GIF
image string to a *.gif file in ASP.Net?
Thank you
hb
|
by: deloford |
last post by:
Hi
This is going to be a question for anyone who is an expert in C# Text Encoding.
My situation is this: I have a Sybase database which is firing back ISO-8559 encoded strings. I am unable to...
|
by: =?ISO-8859-2?Q?Boris_Du=B9ek?= |
last post by:
Hi,
I have an API that returns UTF-8 encoded strings. I have a utf8 codevt
facet available to do the conversion from UTF-8 to wchar_t encoding
defined by the platform. I have no trouble...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |