why do i get windows-1255 message?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I keep getting this message: "Warning: The encoding 'windows-1255' is not supported. See the documentation for FOPEN. > In programtry (line 3) "
this is the program:
clc,clear
fileID = fopen('List.txt','r');
dataTABLE = textscan(fileID, '%f%s%s%f%f%f%[^\n\r]', 'Delimiter', ' ', 'MultipleDelimsAsOne', true, 'HeaderLines' ,0, 'ReturnOnError', false);
fclose(fileID);
does anyone what is the problem?
0 Kommentare
Antworten (1)
Guillaume
am 4 Jun. 2015
Your system locale must be hebrew (Windows-1255), so fopen uses that by default.
The question is: what is the encoding of the file? If it just contains plain ASCII characters, then
fileID = fopen('List.txt', 'r', 'n', 'US-ASCII');
would solve the problem.
If the file does contain some Windows-1255 characters, then the question is: is the file read properly despite the warning?
2 Kommentare
Guillaume
am 4 Jun. 2015
Basically, standard text files (non-unicode) use single-byte characters. That only gives 256 characters which is not enough to represent the characters of every language. Therefore each locale uses its own codepage to define a set of glyph that correspond to character value. For example in Windows-1255 code page, character number 228 will be the hebrew glyph ה (windows-1255), whereas in windows-1253 character number 228 is the greek glyph δ. In US-ASCII the same character is glyph ä.
All code pages share the same glyphs for characters 0 to 127, so if your text file only contain these characters then the code page does not matter and use whichever you want. If the text file contains character values above 127, then these characters will look wrong if you use the wrong codepage.
Siehe auch
Kategorien
Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!