-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
frame label do not accept Chinese characters(UnicodeDecodeError: 'ascii' codec can't decode byte) #11
Comments
The fact that you're getting a Python error means that things are going wrong in Pygments. That may or may not indicate that this is a Pygments issue, though.
If that doesn't work, there may be system encoding issues. Can you type/paste these Chinese characters into the terminal? What is your terminal's encoding? (One way to get that is to open a terminal, start Python, and then type It's possible that even if all that is fine, If possible, you could also try all of this with Python 3.2+. One workaround is to put your label in a macro, say |
thanks for your quick response. I have solved my problem with your suggestion.
also have to use latest
|
Thanks for the nice summary. It looks like the Pygments issue I referenced is responsible for the problem under Python 2.7.
I am closing this issue since the only existing issue is on the Pygments side. I will also add a note in the documentation for the next release about this use case. |
label in frame can not contain Chinese characters. it gives the following error:
Chinese characters appeared in other places worked as expected, no error occurred.
In pygment's documens I read that there is an
encoding
option, I callpygmentize
from command line with-P encoding=UTF8
and those minted handed to pygmentize found in sample.log, but it doesn't work. It seems that this is pygment's fault, but I am not sure.My environment:
Ubuntu 12.04 64bit
TeX Live 2013
XeTeX 3.1415926-2.5-0.9999.3-2013060708 (TeX Live 2013)
python 2.7.3
sample code to reproduce the error, you will have to install a Chinese font and a LaTeX package(xeCJK) to compile. I compile it with command:
xelatex -shell-escape -8bit sample.tex
The text was updated successfully, but these errors were encountered: