[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problems using libiconv
From: |
Genty Jean-Paul |
Subject: |
problems using libiconv |
Date: |
19 Apr 2002 10:00:32 -0700 |
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 .
Have an eye on http://www.langbox.com/codeset/iso8859-6.html to see
what it looks like.
My program looks like this
size_t iSizeOut = 0;
char *ptrSaveUTF8Out = NULL;
iReturnIconv = iconv_string("ISO-8859", "UTF-8",
(const char *)szArabic,
szArabic + strlen(szArabic) + 1,
&ptrSaveUTF8Out,&iSizeOut);
My problem is that iconv_string returns -1 ( first call to iconv in
iconv_string source ).
Anyone has an idea on the correct use of
iconv_string ( and iconv by the way ) ???
Thanks a lot
Jean-Paul Genty