How can I display Russian Cyrillic characters in a figure in MATLAB 7.7 (R2008b)?

89 views (last 30 days)
I want to add a TITLE or a TEXT object in my figure to display a Russian Cyrillic text string. I am using Finnish locale settings on Windows:
 
slCharacterEncoding
ans =
windows-1252
all I see is question marks or empty squares when executing these commands:
 
textInRussian = 'Россия'
title(textInRussian)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 1 Sep 2015
You need to change the locale setting. Your locale setting is Finnish and these setting supports windows-1252 codeset on Windows. It does not support Russian characters, and therefore, Russian characters are not properly handled.
MATLAB does not support Unicode. This means supported characters are limited. Supported characters are determined based on the current locale setting at run-time. The windows-1252 is the one you chose. If you would like to properly display Russian characters, a locale, which supports windows-1251, should be specified. There are several locales, which support windows-1251, and Russian locale is one of them.
In previous versions, MATLAB used the system locale to handle character code conversion. MATLAB 7.7 (R2008b) uses the user locale.
User locale and system locale must be the same value. If these values are not the same, you may see garbled text or incorrect characters.
On Windows, you control the following locale settings:
• user locale
• system locale
The instructions below describes how to set locale on Windows platforms:
User Locale Setting:
Windows 7
1. Select Start -> Control Panel -> Regional and Language Options
2. Open Formats tab
3. Select an item from the drop-down list
Windows Vista
1. Select Start -> Control Panel -> Regional and Language Options
2. Open Formats tab
3. Select an item from the drop-down list
Windows XP
1. Select Start -> Control Panel -> Regional and Language Options
2. Open Regional Options tab
3. Select an item from the drop-down list
Windows 2000
1. Select Start -> Control Panel -> Regional Options
2. Open General tab
3. Select an item from the drop-down list
System Locale Setting
When you change the locale, you must reboot your system; otherwise, you may see unexpected locale-setting behaviors.
Windows 7
1. Select Start -> Control Panel -> Regional and Language Options
2. Open Administrative tab
3. Under language for non-Unicode programs click Change system locale... button
4. Select an item from the drop-down list
5. Reboot the system
Windows Vista
1. Select Start -> Control Panel -> Regional and Language Options
2. Open Administrative tab
3. Click Change system locale... button
4. Select an item from the drop-down list
5. Reboot the system
Windows XP
1. Select Start -> Control Panel -> Regional and Language Options
2. Open Advanced tab
3. Select an item from the drop-down list
4. Reboot the system
Windows 2000
1. Select Start -> Control Panel -> Regional Options
2. Open General tab
3. Click Set default... button
4. Select an item from the drop-down list
5. Reboot the system
------------------------------
Another workaround, especially when you do not have administrator rights to change the settings is the following. Install the freeware font called Mac C Swiss on any Windows System. To access it in MATLAB for a uicontrol for example just type in:
>> uicontrol('fontname','Mac C Swiss', 'string','kak dela')
or when you would like to work with CHAR
>> uicontrol('fontname','Mac C Swiss','string',char(200))

More Answers (1)

Walter Roberson
Walter Roberson on 1 Sep 2015
Edited: MathWorks Support Team on 17 Feb 2021
As of R2014b, Unicode is supported in figures and uicontrol; see
Unicode is not yet supported in LaTex as of R2015a.

MathWorks Support

Categories

Find more on Programming in Help Center and File Exchange

Products


Release

R2008b

Community Treasure Hunt

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

Start Hunting!