discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: UTF8 encoding on Solaris 8


From: Andreas Hoeschler
Subject: Fwd: UTF8 encoding on Solaris 8
Date: Sat, 1 Feb 2003 01:27:30 +0100

Hello,

I just realized that GNUstep (at least my installation) on Solaris 8 cannot handle UTF8.

[[NSString alloc] initWithData:unicodeData encoding:NSUTF8StringEncoding];

The above works on MacOSX but returns nil on GNUstep. I searched the archives and found that iconv needs to be available.

bash-2.03# iconv -V
iconv: illegal option -- V
Usage: iconv -f fromcode -t tocode [file...]
bash-2.03#

It obviously is though it seems it is a different version from the one mentioned in the build guide. I also read someting about setting the internal encoding to UCS-2 to make this work on Solaris. However, it did not find out how to do it. What are my optins now? Has anybody got this working on Solaris 8 and can provide me with suggestions?

In the meanwhile I have rechecked my libiconv

bash-2.03# iconv -f UTF-8 -t UCS-2 test.data
? 47611 bis 47616 als L?abgerechnet. Sortiment lt. Streckengesch?t ist Kiefer. Differenz 259,2 Rm x 0,50 ¬ = 129,6 ¬bash-2.03#

It at least seems to do something. I have reconfigured and rebuild base. I have replaced the UNICODEBIG/UNICODELITTLE stuff in Unicode.m with UCS-2-INTERNAL as was suggested.

/*
* The whole of the GNUstep code stores UNICODE in internal byte order,
* so we do the same. This should be UCS-2-INTERNAL for libiconv
*/
/*#ifdef WORDS_BIGENDIAN
#define UNICODE_INT "UNICODEBIG"
#else
#define UNICODE_INT "UNICODELITTLE"
#endif*/
#define UNICODE_INT "UCS-2-INTERNAL"

No avail. My code still fails to create a NSString from the UTF8 data. This is on Solaris 8 Sparc. Any ideas?

Thanks,

Andreas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]