Subject: Re: iconv_open() / UCS-2-INTERNAL question
To: Christian Biere <christianbiere@gmx.de>
From: Chuck Cranor <chuck@ece.cmu.edu>
List: current-users
Date: 01/29/2007 22:18:09
On Mon, Jan 29, 2007 at 05:02:23AM +0100, Christian Biere wrote:
>"utf-16" instead should work.
>
>Oh we have "ucs-2" too.
>
>$ iconv -l
>
>shows the full list.


"ucs-2" works.   


But I'm not really clear on what the libgphoto2 people are trying
to do.   if you look at the CVS history on this file:

http://gphoto.svn.sourceforge.net/viewvc/gphoto/trunk/libgphoto2/camlibs/ptp2/library.c?view=log

in revision 9119 they added the iconv_open() calls that were directly
wired to UCS-2 

http://gphoto.svn.sourceforge.net/viewvc/gphoto/trunk/libgphoto2/camlibs/ptp2/library.c?r1=9110&r2=9119


then, later on, in revision 9163 log they say 
"fixed iconv for interesting operating systems"  and added this
"UCS-2-INTERNAL" thing which breaks on NetBSD:

http://gphoto.svn.sourceforge.net/viewvc/gphoto/trunk/libgphoto2/camlibs/ptp2/library.c?r1=9162&r2=9163

The ifdef basically means that Linux uses "UCS-2" and BSD/MacOS use
"UCS-2-INTERNAL" 


I looked at our linux systems, and none of them have "UCS-2-INTERNAL"
(according to "iconv -l").   It does seem to be there on FreeBSD 5.4
and on a really old version of NetBSD (where iconv is part of pkgsrc
rathing than in /usr/bin).


I could try and ask the libgphoto2 people to revert revision 9163, but 
they must have had a reason for putting it there?  


chuck