bugGNU Octave - Bugs: bug #53873, "upper" and...


bug #53873: "upper" and "lower" don't work with non-ASCII characters

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Thu 10 May 2018 08:24:55 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 02 Jun 2018 04:09:57 PM UTC, comment #5: 

Closing as fixed.

Markus Mützel <mmuetzel>
Project Member
Sun 27 May 2018 06:02:34 PM UTC, comment #4: 

I pushed a modified version of the patch here:

Marking as ready for test.

Markus Mützel <mmuetzel>
Project Member
Wed 16 May 2018 07:45:27 PM UTC, comment #3: 

The attached patch adds support for ND character arrays.
Also I don't know whether it is always true that upper-case and corresponding lower-case characters (and vice-versa) are represented with the same number of bytes. So I added a fallback for this case.

It passes all tests on Linux (Ubuntu 18.04) and Windows 10 (1803) for me.

(file #44164)

Markus Mützel <mmuetzel>
Project Member
Thu 10 May 2018 09:53:48 PM UTC, comment #2: 

I filed a new bug report about the issue with non-ASCII characters in the test suite on Windows in bug #53875.

Markus Mützel <mmuetzel>
Project Member
Thu 10 May 2018 09:44:13 PM UTC, comment #1: 

The attached patch uses gnulib's u8_tolower and u8_toupper instead of the corresponding functions from the standard library.

The tests will fail on Windows because the .tst-files will be read with the system code page but all our sources are in UTF-8.
We could fix this by temporary switching to UTF-8 while running the test suite. I'll open a new bug report about this.

We should wait with applying this patch until the other bug will be fixed.

(file #44138)

Markus Mützel <mmuetzel>
Project Member
Thu 10 May 2018 08:24:55 PM UTC, original submission:  

In Octave:

>> lower ("AOUÄÖÜ")
ans = aouÄÖÜ
>> upper ("aouäöüß")
ans = AOUäöüß

But it should be:

>> lower ("AOUÄÖÜ")
ans = aouäöü
>> upper ("aouäöüß")

I'll attach a patch as soon as I have a bug number.

Markus Mützel <mmuetzel>
Project Member


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

Attach Files:

Attached Files
file #44164:  bug53873_u8_lower_upper_v2.patch added by mmuetzel (9KiB - application/octet-stream)
file #44138:  bug53873_u8_lower_upper.patch added by mmuetzel (7KiB - application/octet-stream)


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-02 mmuetzel StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2018-05-27 mmuetzel StatusPatch Submitted => Ready For Test
    2018-05-16 mmuetzel Attached File- => Added bug53873_u8_lower_upper_v2.patch, #44164
    2018-05-10 mmuetzel Dependencies- => Depends on bugs #53875
    2018-05-10 mmuetzel Attached File- => Added bug53873_u8_lower_upper.patch, #44138
        StatusNone => Patch Submitted

    Back to the top

    Powered by Savane 3.5