question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot show chinese character

See original GitHub issue
What steps will reproduce the problem?
1. ubuntu 10.04 with chinese language support.
2. sudo easy_install rst2pdf -> 0.16
3. $ rst2pdf s.rst

What is the expected output? What do you see instead?

suppose to display: 你好!, but only get: SS!

Please answer the following questions, they are *very* important:

* Version of rst2pdf?
0.16
* Version of reportlab?
Version: 2.4-1
* Are you using wordaxe, and if true, what version?
no
* Are you using rst2pdf with Sphinx, and if true, what version?
no
Please provide any additional information below.
s.rst and s.pdf are attenched.

Original issue reported on code.google.com by linjunhalida on 9 Nov 2010 at 1:09

  • Merged into: #12

Attachments:

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lornajanecommented, Dec 29, 2020

I can’t read the blog post but from the code snippets I think this would work if you created a stylesheet called chinese.style and added at least this content:

embeddedFonts : [wqy-zenhei.ttf, msyhbd.ttf, wqy-zenhei.ttf, wqy-zenhei.ttf]

fontsAlias:
    stdBold: wqy-zenhei
    stdFont: msyhbd
    stdItalic: wqy-zenhei

Those fonts will also need to be in place on your system. Can you please let us know how it goes? The project maintainers are all English-speaking-only so we don’t work much with any other character sets and input on these topics is very welcome.

PS I’d also recommend that you open a new issue when you run into things rather than commenting on an old, closed one. I almost missed this!

0reactions
837278709commented, Jan 1, 2021

-l zh_cn

It still will not work. I will open a new issue. I used shell cmd like this: rst2pdf -l zh_cn -s chinese test.rst out.pdf

Read more comments on GitHub >

github_iconTop Results From Across the Web

Some of my program cannot display Chinese Character ...
Some of my program cannot display Chinese Character correctly, how to fix them? Hi all,. I'm using Window 10 Home edition, and I...
Read more >
Excel cannot display Chinese characters in the exported ... - IBM
Attempts to open a datapool exported from IBM Rational Functional Tester in Microsoft Excel results in corrupted Simplified Chinese characters.
Read more >
Can't display Chinese character on Microsoft website
Cannot display Chinese character only on Microsoft ... Weird that the website specifies a font that doesn't include CJK glyphs.
Read more >
Fix: Can't Display Chinese Filenames in Windows 10 - YouTube
Can't display chinese filenames in Windows 10? It's quite easy to fix the problem. Right click on Windows Start button I File Explorer...
Read more >
PyCharm Editor cannot display Chinese characters correctly.
PyCharm Editor cannot display Chinese characters correctly. · If copy the ill-displayed string and paste it in the console window, it will be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found