[Top][All Lists]

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

locale and octave

From: Josep Monés i Teixidor
Subject: locale and octave
Date: Tue, 21 Sep 2004 22:12:00 +0200


First of all a bit of context:

I'm working on a set of functions to read and write data to gnumeric
spreadsheets (using a similar interface as Excel - xls* - functions).

To do this, since gnumeric file format is xml-based, i'm using
libxml2(*). This library uses UTF-8 strings everywhere so I need to
encode everything UTF-8 when finding sheets or when reading strings from

Now the questions:

1.- It looks to me as if Octave is not l10n-aware; strings are compared
using strcmp, i can't see any call to setlocale (so I assume it works
using C locale). I think that Octave should call setlocale(LC_ALL, "")
at startup and use strcoll (or C++ equivalents in <locale> std::collate
and this stuff). Or perhaps even using wstring internally and converting
back and forth to user locale when interating. What do you think? Is
there a plan to include l10n to Octave (not talking about translations

For instance, try length("à") in a UTF-8 terminal....

2.- This is Octave-Forge related... What would it be the best way to
convert from current locale to UTF-8? What dependency is preferred (what
is the same, compulsory right now) glib, libiconv?


(*) mmm... if it's ok for octave-forge to have this it will be YAD (Yet
Another Dependency (tm)) to octave-forge... But I don't wan't really to
do this without a lib...
Josep Monés i Teixidor
Clau GnuPG: gpg --recv-keys 80E85CC4

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

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