I tried running following simple function which creates a file which contains non-ASCII character in its filename. I wrote some text in it and tried to read it back using "textread" but while doing so I received error saying file was not found.
I tried following code:
filename = char([65 181 66]);fid = fopen(filename, 'w'); fprintf(fid, '%s\n', 'hello'); fclose(fid);textread(filename, '%s')
I received following error after executing code:
Error using dataread
File not found or permission denied.
Error in textread (line 168)
[varargout{1:nlhs}]=dataread('file',varargin{:}); %#ok<REMFF1>
Why does textread fail while working with files which contain non-ASCII characters in their filename? Is there any workaround I can use to read these files?
Best Answer