bugGNU Octave - Bugs: bug #60480, unicode2native with empty string

 
 

bug #60480: unicode2native with empty string

Submitter:  Guillaume <gyom>
Submitted:  Thu 29 Apr 2021 04:09:10 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 30 Apr 2021 03:19:12 PM UTC, comment #3: 

Fix needed to be in the m-file because the input validation in the m-file is run before one even reaches the call to _unicode2native_.  I also changed native2unicode to be higher performing in this changeset: http://hg.savannah.gnu.org/hgweb/octave/rev/377f5ab42dd5.

Anyways, marking as Fixed and closing report.

Rik <rik5>
Group administrator
Fri 30 Apr 2021 08:46:02 AM UTC, comment #2: 

Thanks, Rik. I didn't suggest a fix as I was not sure whether the fix should be in the M-file or within _unicode2native_, all good if it can be in the former.

Guillaume <gyom>
Fri 30 Apr 2021 04:48:31 AM UTC, comment #1: 

Simple fix in the m-file to check for the case of empty input.  See changeset http://hg.savannah.gnu.org/hgweb/octave/rev/e9771f0e180c.

Marking as Ready for Test.

Rik <rik5>
Group administrator
Thu 29 Apr 2021 04:09:10 PM UTC, original submission:  


octave> unicode2native('')
error: unicode2native: UTF8_STR must be a character vector
error: called from
    unicode2native at line 53 column 5


Matlab returns uint8([]).

Guillaume <gyom>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by gyom (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-30 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2021-04-30 rik5 StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code