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: Markus Mützel
Subject: [Octave-bug-tracker] [bug #49348] Treat multi-byte characters as one character for char array
Date: Thu, 29 Oct 2020 09:06:54 -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 Edg/86.0.622.56

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

As a rule of thumb when working with strings:
- Casting from a numeric stream to char is problematic. It is important to
consider the input encoding (equally in Matlab and in Octave). Use
`native2unicode` instead of casting to char.
- It it not save to expect a complete code point entity when indexing into a
character array (equally in Matlab and in Octave). Octave has the function
`unicode_idx` to somewhat mitigate this issue.

    _______________________________________________________

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]