필터 지우기
필터 지우기

can't change encoding of text file

조회 수: 3 (최근 30일)
Kobi
Kobi 2014년 12월 23일
편집: per isakson 2014년 12월 23일
while using the function fopen and textscan for text file i get this warning:
*Warning: The encoding 'windows-1255' is not supported.
See the documentation for FOPEN.
> In txt2mat at 16
> In Inversion at 11*
i googled the problem and found this:
if the problem is in the current encoding type, i can't change it the problem is that i can't change the encoding for example if i add this line to the function: slCharacterEncoding('Windows-1252') matlab won't run any commands.
and this is few of the files that i'm trying to read:
don't understand this error and what am i doing wrong, but i do get unexpected resaults.
  댓글 수: 2
per isakson
per isakson 2014년 12월 23일
편집: per isakson 2014년 12월 23일
Please upload the files together with the question. See the paper-clip button. I failed to download the m-file. The new-line characters were lost somewhere on the way.
Kobi
Kobi 2014년 12월 23일
the original post has been edited i can't upload the 'exp' file in this site but it is attached to the post in a new link can you please try again?

댓글을 달려면 로그인하십시오.

채택된 답변

per isakson
per isakson 2014년 12월 23일
편집: per isakson 2014년 12월 23일
The code runs here (R2013a,Win7) without any problems
&nbsp
"Warning: The encoding 'windows-1255' is not supported." &nbsp Matlab doesn't support 'windows-1255', (see fopen). Is your computer configured with 'windows-1255'?
Try
fid = fopen( adress, 'r', 'n','windows-1250' );
"slCharacterEncoding" &nbsp is a Simulink function. AFAIK: it has nothing to do with textscan

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by