guile-devel
[Top][All Lists]
Advanced

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

Re: Using libunistring for string comparisons et al


From: Peter Brett
Subject: Re: Using libunistring for string comparisons et al
Date: Thu, 31 Mar 2011 15:59:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hi Peter,
>
> Peter Brett <address@hidden> writes:
>
>> It would certainly make my life as a downstream application maintainer
>> much, much easier if all Guile API functions that accept a C string
>> argument expected UTF-8.
>
> Out of curiosity, what kind of C libraries and tools do you use?
>
> My impression is that GLib & co. are well-equipped to deal with UTF-8
> whereas other C libraries and programs would rather work with locale
> encoding or ‘wchar_t’ using the standard C APIs.
>

Yep, lots of GLib.  Our file formats use UTF-8, and all of our
non-Scheme code uses UTF-8.  We are pretty careful about ensuring that
our C code is UTF-8 safe (using GLib!), but spend a lot of time crossing
our fingers and hoping that if we pass a string to Guile we'll get it
back in the right encoding.  Note that we have to support Guile 1.8.x as
well, probably until at least 2013.

Some tips on the safest way to do this would be great (but probably
belong on guile-user or [even better] in the fine manual).

                              Peter

-- 
Peter Brett <address@hidden>
Remote Sensing Research Group
Surrey Space Centre




reply via email to

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