Clear Filters
Clear Filters

Chinese characters in axis title, label or legend in R2012b (or earlier) possible or not possible?

7 views (last 30 days)
I am running Matlab R2012b English edition on a Windows 10 PC. I am not able to incorporate Chinese characters in any of the text objects belonging to a graph, be it axis labels, title, legend or text. On the other hand, it is possible to display Chinese characters in text strings belonging to UI control objects such as a push button if I prior to that set the character encoding to UTF-8 using
feature('defaultcharacterset','UTF-8')
But that has no effect on text objects belonging to axes. When I try for instance title('垂直'), it just gives a bunch of nonsense ASCII characters. So my question is simply, is there a way using this release of Matlab? It is not possible for us to use a later version of Matlab since this is a deployed commercial software distributed worldwide.

Accepted Answer

Fredrik Gustavsson
Fredrik Gustavsson on 1 Apr 2022
I will answer myself - yes it is possible. Instead of
feature('defaultcharacterset','UTF-8')
use
feature('defaultcharacterset','GBK')
and change the system locale language in Windows to Chinese (this will not change your Windows desktop language so don't worry in case you don't read Chinese). Perhaps there is a neat way to change the system locale language from Matlab but my attempts to do it did not work.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products


Release

R2012b

Community Treasure Hunt

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

Start Hunting!