User`s guide
Desktop Tools and Development Environment
8-5
fpOut = fopen(outfile, 'w', 'n', 'UTF-8');
while feof(fpIn) == 0
lineIn = fgets(fpIn);
fwrite(fpOut, lineIn, 'char');
end
fclose(fpIn);
fclose(fpOut);
end
Compatibility Considerations
In a future release, the UTF-8 version of the MathWorks locale database will be the
default on Mac OS X systems. Any text file created in MATLAB that is encoded in the
user default encoding and contains characters other than 7-bit ASCII characters must
be converted to the UTF-8 encoding scheme. Otherwise, MATLAB and other MathWorks
products might not be able to properly load the files.
You must convert the file encoding before changing the default locale database.