MATLAB: What are the limitations on encoding schemes in low-level file I/O functions in MATLAB 7.2 (R2006a)

MATLAB

In MATLAB 7.2 (R2006a), the FOPEN function has a new optional argument to specify the character encoding scheme associated with the file. Low-level functions that read data from files, including FREAD, FSCANF, FGETL, and FGETS, read characters using the encoding scheme associated with the file during the call to FOPEN. Low-level functions that write data, including FWRITE and FPRINTF, write characters using the encoding scheme associated with the file during the call to FOPEN.

Best Answer

Support for character encoding schemes has these limitations:
*Surrogate pairs are not supported. Each surrogate pair is read as a replacement character, the equivalent of char(26).
*Stateful character encoding schemes are not supported.
*Byte order marks are not interpreted in any special way. Your code must skip them if necessary.
*Scanning of numbers, using fscanf, is supported only for character encoding schemes that are supersets of ASCII. (Most popular character encoding schemes, with the exception of UTF-16, are such supersets.)