[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems using libiconv
From: |
Hans-Bernhard Broeker |
Subject: |
Re: problems using libiconv |
Date: |
20 Apr 2002 14:08:42 GMT |
Genty Jean-Paul <address@hidden> wrote:
> Hi
> I wish to convert a ISO-8859-6 string to UTF-8.
> I use iconv_string shipped with libiconv.
> To simplify my initial string is
> szArabic[0]= 0x0D;
> szArabic[1]= 0x0D;
> szArabic[2]= 0x0D;
> szArabic[3]= 0x00;
> The arabic letter DAD ( 214 ) is repeated three times in my string .
Not if the above really describes the contents of it correctly. 0x0D
is the ASCII character for carriage return, and even though I've never
seen any reference for iso-8859-6 in my life, I'm certain that it does
not override the meaning of a well-defined and important ASCII
character code just like that. Decimal character code 214 is 0xD6.
> size_t iSizeOut = 0;
> char *ptrSaveUTF8Out = NULL;
> iReturnIconv = iconv_string("ISO-8859", "UTF-8",
> (const char *)szArabic,
^^^^^^^^^^^^^^
This should never be necessary. Pointer casts in a C program almost
always mean some real error is being brushed under the carpet.
--
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.