octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #54170] java.lang.String.toCharArray result in


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #54170] java.lang.String.toCharArray result incorrect conversion to char matrix
Date: Mon, 25 Jun 2018 05:52:33 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #12, bug #54170 (project octave):

You are raising some valid points. In the light of this, your options 1 or 2
in comment #6 seem to be the way to go.
What is the result for class(cs2{1}) in your example in comment #10? Maybe we
should try and do what Matlab is doing.

It might lead to even more confusion if we introduced a special char class
just for UTF-16 (and maybe another one for UTF-32?).

We can still think about what calling "char" on a Java char array should do:
Should we convert to UTF-8? As far as I understand, the gnulib conversion
functions don't do any normalization by default. So it might still be possible
to get consistent results after a round trip Octave char -> Java String ->
Octave char (i.e. UTF-8 -> UTF-16 -> UTF-8).

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54170>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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