bugGNU Octave - Bugs: bug #51836, uigetfile() returns unusable path...


bug #51836: uigetfile() returns unusable path with special characters (German Umlaut)

Submitted by:  None
Submitted on:  Thu 24 Aug 2017 06:50:05 AM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error
Status:  Duplicate Assigned to:  None
Originator Name:  Tim Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.1
Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)

You are not logged in

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


Sat 26 Aug 2017 08:18:30 PM UTC, comment #2: 

The patch in bug #49118 (file #41670) should fix dlmread with non-ASCII characters.

As a workaround, you could manually replace the non-ASCII characters (stored internally as UTF-8 in Octave) with their respective code points on your local codepage. Assuming you are using ISO 8859-1, ISO 8859-15 or Windows-1252, the following code snippet would replace the "ü" character:

fname = "test.S1P";
fpath = "Tür";
fpath = strrep (fpath, "ü", char(252));
input = dlmread (fullfile (fpath, fname), '\t');

...and similarly for the other non-ASCII characters you want to use.

In Octave 4.3.0+ (development version), the replacement would be done with:

fpath = char (unicode2native (fpath));

Markus Mützel <mmuetzel>
Project Member
Thu 24 Aug 2017 11:32:38 AM UTC, comment #1: 


Thanks for your bug report. This is a known issue and it is currently being addressed in bug #49118 .

Closing report as duplicate.

Pantxo Diribarne <pantxo>
Project Member
Thu 24 Aug 2017 06:50:05 AM UTC, original submission:  

I use uigetfile() to choose a file and path with measured data and open with dlmread(). Therefor I pass the returned fpath and fname from uigetfile() to dlmread().

With version 4.0.0 this way worked, even when there are special characters in fpath or fname. Now with version 4.2.1 I get an error, when there is an special character (German Umlaut).

This is an extract of my script:

[fname, fpath, fltidx]=uigetfile("*.S1P");
input=dlmread([fpath fname],'\t',5,0);

Now I try to open "Data.S1P" from "C:\HF-Tools\Tür".

This is the output from Octave with version 4.0.0:

fpath = C:\HF-Tools\T³r\

This is the output from Octave with version 4.2.1:

fpath = C:\HF-Tools\T├╝r\
error: dlmread: unable to open file 'C:\HF-Tools\T├╝r\Data.S1P'
error: called from
    test at line 5 column 6



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

Attach Files:

No files currently attached


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by None (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-26 mmuetzel Dependencies- => Depends on bugs #49118
    2017-08-24 pantxo StatusNone => Duplicate
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5