|
Home > Archive > Unix Programming > October 2005 > Unicode conversions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Unicode conversions
|
|
| djake@excite.it 2005-10-24, 3:47 pm |
| Someone know hot to convert unicode to 8 bit character, under unix?
(for example convert wchar_t to char and char to wchar_t)
Thanks
| |
|
|
| Måns Rullgård 2005-10-24, 3:47 pm |
| djake@excite.it writes:
> Someone know hot to convert unicode to 8 bit character, under unix?
That's generally impossible, since most there are more than 256
unicode characters. If you know your source can be encoded with for
instance iso-8859-1, you can use iconv. It is available both as a
library function, and as a standalone program.
> (for example convert wchar_t to char and char to wchar_t)
IIRC, nothing says wchar_t needs to be unicode.
--
Måns Rullgård
mru@inprovide.com
| |
| Mikko Rauhala 2005-10-24, 3:47 pm |
| On Tue, 18 Oct 2005 19:00:58 +0100, Måns Rullgård <mru@inprovide.com> wrote:
> IIRC, nothing says wchar_t needs to be unicode.
I'll just chime in to verify that this is true. Of course, it often is
Unicode, and if the macro __STDC_ISO_10646__ is set, this can even be
relied upon.
--
Mikko Rauhala - mjr@iki.fi - <URL:http://www.iki.fi/mjr/>
Transhumanist - WTA member - <URL:http://www.transhumanism.org/>
Singularitarian - SIAI supporter - <URL:http://www.singinst.org/>
|
|
|
|
|