Hi all,
Working on a C project that uses iconv, it works properly on Fedora and Windows yet fails on FreeBSD-8.2.
Hoping someone can point me in the direction of a resolution.
The errno is 86, And is defined in /usr/local/include/iconv.h as:
The byte sequence appears correct, See below.
With the following info one would think it would work on FreeBSD and Win32, but not Fedora.
Systems info:
Code frag:
FreeBSD gdb shows
I do believe that to be the correct value ...
Thanks y'all.
-Enjoy
fh : )_~
Working on a C project that uses iconv, it works properly on Fedora and Windows yet fails on FreeBSD-8.2.
Hoping someone can point me in the direction of a resolution.
The errno is 86, And is defined in /usr/local/include/iconv.h as:
Code:
EILSEQ 86 /* Illegal byte sequence */
With the following info one would think it would work on FreeBSD and Win32, but not Fedora.
Systems info:
Code:
FreeBSD 8.2
#iconv --version
iconv (GNU libiconv 1.14)
Copyright (C) 2000-2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Bruno Haible.
Code:
WinXPsp3/Win7
C:\>iconv --version
iconv (GNU libiconv 1.14)
Copyright (C) 2000-2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Bruno Haible.
GNU libiconv v1.14
Code:
Fedora v?? (copy and paste from another users email)
#iconv --version
iconv (GNU libc) 2.15
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.
Code frag:
Code:
char mb[8];
char *outbuf = mb;
size_t inlen = sizeof(wchar_t)/sizeof(char);
size_t outlen = 8
wchar_t &wc = THIS->operator[](i);
const char *inbuf = (const char *)&wc;
codec = iconv_open("UTF-8", "WCHAR_T");
iconv(codec, NULL, NULL, NULL, NULL);
if(iconv(codec, &inbuf, &inlen, &outbuf, &outlen) == -1)
Code:
(gdb) x inbuf
0x28ee2d10: 0x00007684
Thanks y'all.
-Enjoy
fh : )_~