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: Ludovic Courtès
Subject: Re: Using libunistring for string comparisons et al
Date: Thu, 31 Mar 2011 22:12:52 +0200
User-agent: Gnus/5.110013 (No Gnus v0.13) Emacs/23.3 (gnu/linux)

Hi,

Peter Brett <address@hidden> writes:

> address@hidden (Ludovic Courtès) writes:

[...]

>> 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.

File formats aren’t a problem since port I/O can use your encoding of
choice.

> 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).

NEWS for 2.0.0 explains the differences in details, sometimes with
examples on how to transition from 1.8.  You may find the deprecation
mechanism helpful too.

Hope this helps,
Ludo’.




reply via email to

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