Change MATLAB character set encoding
the MATLAB® character set encoding to the one you specify. Use this syntax to
change the current MATLAB character set encoding to be compatible with the character encoding of
a model that you want to open. Close all open models or libraries before changing
the MATLAB character set encoding except when changing from US-ASCII to another
Use this syntax to specify these encodings:
If you want to use a different character encoding, start MATLAB with the appropriate locale settings for your operating system. Consult your operating system manual to change the locale setting. Simulink® can support any character encoding that uses single-byte or double-byte characters.
the current MATLAB character set encoding.
current = slCharacterEncoding()
Suppose that you create a model in a MATLAB session configured for
'Shift_JIS' and open it
in a session configured for
'US-ASCII'. The warning message
shows the encoding of the current session and the encoding used to create the
model. If you encounter any problems with corrupted characters, for example when
using MATLAB files associated with the model, then use the
to change the character encoding.
Close all open models.
Find out the current encoding.
ans = 'windows-1252'
slCharacterEncoding to change the character
encoding of the current MATLAB session to match the model character encoding, for example to
Reopen the model.
encoding— Character encoding to set
Character encoding to set, specified as one of these values: