octave-maintainers
[Top][All Lists]
Advanced

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

Re: unsigned characters


From: Olli Saarela
Subject: Re: unsigned characters
Date: Fri, 01 Jun 2007 13:23:06 +0300
User-agent: Thunderbird 2.0.0.0 (Windows/20070326)

John W. Eaton wrote:
On 30-May-2007, Olli Saarela wrote:

| Proper handling of national
| characters in Octave might be a larger project, though. The data type | used is signed 8-bit which cannot hold the necessary codes:
| octave.exe:23> double(char(246))
| ans = -10
| This should return 246 (the code for letter ö).

Yes, the problem is that Octave uses std::string and the charMatrix
and charNDArray objects use char instead of unsigned char.  Fixing
this will touch many files.  I suppose we need to do it eventually,
but I don't see it happening before 3.0 unless people want to delay
the release for the time it will take to resolve all the little
problems that a large change like this is likely to create.

jwe



I see this as a low-priority item, even though I'm a daily user of umlaut characters. Please don't delay 3.0 for it.

As a workaround,
   double(str)+128*(str<0)
has been needed only in a couple of places in my code. Pictures aimed for publication I generate with script files anyway (to make the results repeatable), and
   plot(rand(5,1));
   title('Characters with diacritics: åäöÅÄÖ');
works when executed from a script.

Olli



reply via email to

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