How can MATLAB code in an M-file query the current locale's character encoding WITHOUT needing the Simulink toolbox?

How can MATLAB code in an M-file query the current locale's character encoding without needing the Simulink toolbox?
(Note that slCharacterEncoding() and get_param() are both Simulink toolbox functions.)

 Accepted Answer

Hi Michael,
You can utilize the following command to query the current locale's character encoding:
feature('locale')
Hope this helps!

1 Comment

Yes, that helps! Note that that returns a struct, with relevant fields named encoding, terminalEncoding, and jvmEncoding.

Sign in to comment.

More Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Products

Release

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!