CWString

John Meacham john at repetae.net
Tue Aug 26 14:43:05 EDT 2003


On Tue, Aug 26, 2003 at 10:53:31AM +0200, Marcin 'Qrczak' Kowalczyk wrote:
> Dnia wto 26. sierpnia 2003 02:04, John Meacham napisał:
> > my implementation is pretty hairy, but can be improved. it currently
> > only works on systems where __STDC_ISO_10646__ is defined, but
> > fortunatly, I have never come across a system where it was not defined
> > and it implemented wchar_t at all.
> 
> AFAIK on FreeBSD wchar_t is not Unicode. It generally has broken locale and 
> Unicode support in other respects as well.
I guess we can't really provide a better interface than the system
provides when it comes to locale. I am currently working on porting the
code to solaris, where it appears that wchar_t is unicode 99% of the
time but they are unwilling to guarentee it with __STDC_ISO_10646__ so I
must do a run-time check of some sort.. perhaps something similar will
work on the BSDs.
At worst, we can always fall back to the 'C' locale which is guarenteed
to be supported.

> > the localized versions of the CString routines are named with LCString,
> > which stands for localized C string...
> 
> In future they should replace current CString functions which can be 
> renamed to Latin1CString.

yeah, keeping these around would be good, there is no shortage of code
which assumes everything is latin1 (like all of haskell until recently
:) )
        John
-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john at foo.net
---------------------------------------------------------------------------



More information about the FFI mailing list