Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Thanks to Szabolcs' comment to this question, I have found a way to Export Cyrillic symbols from Mathematica to PDF correctly. We just need to set a system-wide variable commonly called the system local (or language for non-Unicode applications) to US English as described here:

  1. Open Regional and Language Options in Control Panel.

  2. On the Advanced tab, under Language for non-Unicode programs, select English (US).

This approach has few usability limitations:

  • Only an administrator has the ability of setting the system locale value.
  • Setting the system locale requires a system reboot.
  • Only one system locale can be set at a time.

Unfortunately, this setting affects not only Mathematica, but every non-Unicode program that is used on the computer including some components of Windows itself. As the result, these programs work incorrectly and in some cases changing this option can even cause a BSOD. For example, the command-line interpreter cmd.exe on localized version of Windows after setting system local to English looks as follows: cmd.exe

For Windows Server 2003 and Windows XP Microsoft developed the Microsoft AppLocale Utility which is intended to allow to run non-unicode applications without changing the system locale (thanks Windows programmer for the reference). But I failed to get it working for Mathematica.

Is it possible to set system locale individually for Mathematica in order to get correct Cyrillic Export to PDF?

EDIT

There is the PDF.exe MathLink executable in the .\SystemFiles\Converters\Binaries\Windows directory. Probably we should set the system locale US English precisely for this executable?

P.S. I use localized Windows XP SP3.

share|improve this question

migrated from mathematica.stackexchange.com Aug 11 '12 at 22:31

This question came from our site for users of Mathematica.

    
If this doesn't get you a solution you might try asking on SuperUser (or flag for migration) as this is less about Mathematica. –  Mr.Wizard Aug 11 '12 at 5:08
    
@Mr.Wizard Probably you are right, I will flag it for migration on SuperUser. –  Alexey Popkov Aug 11 '12 at 22:08
    
From a command prompt, if you run mode con cp, what codepage does it report? It must be 866 for Russian. –  bytebuster Aug 14 '12 at 14:09
    
@bytebuster Yes, I get 866. –  Alexey Popkov Aug 14 '12 at 14:54
    
Then, you have two items to check: (1) Code page conversion tables, controlled through the Advanced tab; (2) font substitutions like "Arial,0"="Arial,204" and "Arial"="Arial,204" are missing in registry. –  bytebuster Aug 14 '12 at 15:41

1 Answer 1

up vote 1 down vote accepted

It seems that the problem can be solved by setting explicit value of the CharacterEncoding global FE option (checked with MMa 8.0.4 and 9.0.0):

SetOptions[$FrontEnd, CharacterEncoding -> "UTF8"];
Export["test.pdf", "кириллический текст"]

An equivalent way (without changing the global FE settings):

Export["test.pdf", 
 Style["кириллический текст", CharacterEncoding -> "UTF8"]]

Instead of "UTF8" one may set "UTF-8" or "ASCII" with the same effect. The drawback of this approach is that all non-English letters are outlined.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.