MATLAB: Can’t I read international characters from the PC-850 based ASCII file in MATLAB 7.2 (R2006a)

aasciicharacterdisplaydoublefileinternationalMATLABopc-850readunicode2native

My PC-850 based ASCII file contains the Nordic character å, ä and ö. When I use FGETL to read the file the å, ä and ö characters are displayed as “„“ and if I use the DOUBLE function to convert the character to its corresponding numerical value I get the wrong number, e.g. 8222 for ä when it should be 132.

Best Answer

The PC850 codeset is not supported by any locale settings on Windows platform by default. You can use the UNICODE2NATIVE function instead. This will show you that the file is read correctly and you will get the numerical values 132 for the character ä.