You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encoding questions are hard to understand, I'll try to be as clear as possible and I won't explain what an encoding is as you can read really interesting articles elsewhere about that. Instead, I'll let you try various solutions and let you ask if you're interested in why it solved your problem (if you're not, we will both save a lot of time 😄).
First of all: Remove the encoding parameter, it's useless for you.
Try one/many of:
If you're in an interactive terminal, or if you don't mind getting a quick and dirty solution, replace "<h5>我是</h5>" by u"<h5>\u6211\u662f</h5>". I can't find a configuration where this solution doesn't work.
If you use Python 2, use u"<h5>我是</h5>" instead of "<h5>我是</h5>".
Check that your file is stored on your disk using the UTF-8 encoding. Your text editor can do that.
Check that there's no encoding set in a comment at the top of your file (Python 3.x) or that the encoding set is UTF-8.
I'm closing this issue as there's nothing to do in WeasyPrint, but don't hesitate to comment and ask if needed, I'll do my best to help you.
code:
then, pdf file body is
带兒
The text was updated successfully, but these errors were encountered: