[Top][All Lists]

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

Re: Multi-byte characters

From: Cecil Westerhof
Subject: Re: Multi-byte characters
Date: Mon, 21 Jun 2010 16:20:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Op maandag 21 jun 2010 15:20 CEST schreef Mike Gran:

>> From: Cecil Westerhof address@hidden
>> I am experimenting with Guile. It looks like the performance is not that
>> good. But I continue. One of the things is multi-byte characters. I want
>> to replace spaces with non breaking spaces. But Guile sees a non
>> breaking space ( ) as two characters (when using string-length). Is
>> there a way to let Guile see it as one character?
> Guile 1.8.x only had native support for 8-bit characters, so string-length
> is going to return the byte length of the string.
> Recent versions of Guile 1.9.x should have reasonable multi-byte character
> support, but, to get it to work, you need to declare your locale.  UTF-8
> isn't necessarily assumed as default.
> You might have to call (setlocale LC_ALL "") at the top of your program,
> or maybe explicitly set your port's encoding with
> (set-port-encoding! port "UTF-8")

As I understand it Guile 2.0 should be released in the near future, I
wait for that version then. At the moment I am just playing with it, so
it is not that important (at the moment).

Cecil Westerhof
Senior Software Engineer

reply via email to

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