bugGNU Octave - Bugs: bug #59269, dlmread error when file path have...

 
 

bug #59269: dlmread error when file path have utf8 character

Submitted by:  None
Submitted on:  Wed 14 Oct 2020 12:15:31 PM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Need Info Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  5.2.0
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.

 

( Jump to the original submission)

Tue 20 Oct 2020 02:59:58 AM UTC, comment #6: 

Thank you for your reply. I tested with version 6.0.90, and the same error still occurred.

dillcn
Mon 19 Oct 2020 07:58:42 AM UTC, comment #5: 

Also: You don't need to (and should not) open a file with `fopen` if you want to read its content with `importdata`. `fopen` is meant to be used for functions that expect a file identifier `fid` (e.g. `fgets`, `fprintf`, ...)

Markus Mützel <mmuetzel>
Project Member
Mon 19 Oct 2020 07:54:49 AM UTC, comment #4: 

Ah. Thank you for explaining in more detail.

There have been some improvements wrt opening files with non-ASCII characters on Windows for Octave 6.
Could you please check if the same procedure still fails to read files (with `importdata`) with the current release candidate Octave 6.0.90a? You can download it from here:
https://alpha.gnu.org/gnu/octave/?C=M;O=D

The fullwidth CJK characters being displayed twice is bug #58637. (This is just a displaying issue in the command window. Internally, the file name and path should be fine.)

Markus Mützel <mmuetzel>
Project Member
Mon 19 Oct 2020 06:05:00 AM UTC, comment #3: 

I'm sorry it wasn't described clearly, and I really don't know where the mistake was.
Windows version 10 with Octave 5.2.0.
I use "uigetfile('*.csv')" to get file path, and "filepath" got the correct file path.
But when I use "fopen(filepath)" to open the file, and use "importdata(filepath, ",")" to importdata, the following error occurred:
====error======
error: dlmread: unable to open file 'C:\Users\lyd\Documents\projects\录录波波文文件件\wave_files\2008年年07月月18日日06时时23分分07秒秒.csv'.
error: called from
    importdata>importdata_ascii at line 249 column 17
    importdata at line 128 column 40
===============
The real file path is "C:\Users\lyd\Documents\projects\录波文件\wave_files\2008年07月18日06时23分07秒.csv", and "filepath" does get the correct file path. But the Chinese characters in the error messages are repeated, and importdata does not work.

dillcn
Wed 14 Oct 2020 05:54:25 PM UTC, comment #2: 

I cannot reproduce on Windows 10 with Octave 5.2.0.

Which Windows version are you using?

I am also not sure why `uigetfile` would call `dlmread`.
Can you please show the exact steps to reproduce the error?

Markus Mützel <mmuetzel>
Project Member
Wed 14 Oct 2020 01:00:14 PM UTC, comment #1: 

Unable to reproduce on Linux (all file names are accepted). Looks like it's a Windows-specific error?

Anonymous
Wed 14 Oct 2020 12:15:31 PM UTC, original submission:  

Use "uigetfile" to open a file. If the file path contains utf8 characters,such as Chinese characters, an "dlmread" error is reported:
error: dlmread: unable to open file '***'.

Anonymous

 

(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 dillcn (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  •  

    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.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-14 mmuetzel StatusNone => Need Info

    Back to the top


    Powered by Savane 3.5