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

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

[Octave-bug-tracker] [bug #49348] Treat multi-byte characters as one cha


From: HJW
Subject: [Octave-bug-tracker] [bug #49348] Treat multi-byte characters as one character for char array
Date: Thu, 29 Oct 2020 05:03:13 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36

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

I don't mean UTF-16, I mean uint16, as most chars seem to be stored internally
in Matlab. When using functions like strrep, multibyte characters either
result in an error (if you keep the class uint8), or lead to a different
result from that in Matlab (if you cast to char).

An alternative to completely overhauling Octave might be to overload the
size/numel/subsref(/more?) functions for char to hide from the user that their
char isn't stored as uint16. That way the interface to the user will be the
same as in Matlab, which is what I'm after anyway. I personally don't care if
a scalar char is one or more bytes, I just care that it is a single character.
I suspect reasonable minds can disagree on that.

As far as the FileExchange is concerned: as the code for most of my
submissions is also on GitHub, I don't see why Mathworks would get any say
over who is using the code. They even have a category they auto-populate:
https://www.mathworks.com/matlabcentral/fileexchange/?category[]=1459
(although some of these are about sound). Even if I agreed to that kind of
exclusivity, others can still get my code, as it is CC-by-nc-sa (which they
(only) allow if you host the code on GitHub).

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?49348>

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




reply via email to

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