folowing is the content my test nb File: pdfTest.nb, contain some chinese characters:


After Save as or Export, pdf file looks well for the Chinese content.

But when Import, it seems become WindowsANSI Encoding.

When I Import the pdf file


Show this


When I Export and Re-Import the .txt file, it works fine.


good result:


my-enviroment is windows 8 mathematica 9.0 chinese version.


Maybe someone is hard to test.

My question is:

1: How to directly import the pdf file contain chinese characters and show well.

2: if the solution for question 1 is not possible, is it necessary to Export using CharacterEncoding->"WindowsANSI" and re-Import? ,

ie. How to convert the characterEncoding in notebook without the export manipulation? Convert SampleCode2 to SampleCode1

Futhermore, When I import some pdf generated by Tex or obtain other where, also will encouter with CharacterEncoding Problem. I think Import Pdf File should better add an Elements that Import pdf pages as Rasterized image list.

  • $\begingroup$ @ruebenko sorry for that, Let me edit , I think I mis-edit them by myself. I just wanna make them a littel different in appearance $\endgroup$ – HyperGroups May 8 '13 at 13:02
  • 1
    $\begingroup$ Hi HyperGroups, I think the chinese version Mathematica might use different UnicodeLanguageFontMapping.tr file than english/japanese version. And there might be some other differences as well. But unfortunately, most people (including me) on this site don't have any access to chinese versions to test your problem, so it could be hard here to get a complete answer for your question. Nevertheless, I would suggest you investigating the problem with help of some HEX/Binary file viewer, and with a deeper understanding about character encoding, GBK, UTF-8, Unicode, etc. $\endgroup$ – Silvia May 8 '13 at 17:23
  • $\begingroup$ @Silvia, thanks for tips about encoding, I remember that Export pdf cause some encoding problem with characters in Chinese before the Chinese version was released. And this(export) was solved after the Chinese version released. $\endgroup$ – HyperGroups May 9 '13 at 2:30
  • $\begingroup$ I remember some problem with GBK characters, but not sure whether they are solved or not. About the encoding, You may want to check out this: Quiet[Outer[Check[FromCharacterCode[ToCharacterCode["en汉字",#1],#2],$Failed]&,#,#]&@$CharacterEncodings]. $\endgroup$ – Silvia May 9 '13 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.