Skip to content
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

utf-8编码的字体名称显示为乱码 #248

Open
strnghrs opened this issue Nov 23, 2024 · 1 comment
Open

utf-8编码的字体名称显示为乱码 #248

strnghrs opened this issue Nov 23, 2024 · 1 comment
Assignees
Labels
缺陷 Something isn't working

Comments

@strnghrs
Copy link

PDF补丁丁的版本
PDFPatcher.1.1.0.4584

请简要描述你遇到的问题
附件中的PDF,内嵌字体名称是utf-8编码,在补丁丁的字体替换功能中,列出字体时,显示的字体名是乱码,但在Acrobat的属性中显示正常。

自动判断一个字符串是ANSI、utf-8还是Unicode的代码,在github上有一些,好用不好用的再说。我自己用的是Windows XP源代码中记事本的C源代码,记事本打开文本文件的时候会自动判断编码。[
字体名称是utf-8.pdf
](url)

@wmjordan wmjordan added the 缺陷 Something isn't working label Nov 24, 2024
@wmjordan wmjordan self-assigned this Nov 24, 2024
@wmjordan
Copy link
Owner

这个问题不太好整,iText似乎有BUG,返回的某些字符串中最后一个字不正确。

暂时凑合对付的方法:
点击“文件”菜单,选择“程序选项”,在弹出的对话框“字体名称”对应的下拉框中选择UTF-8,然后重新读取字体,就会按UTF-8来读取字体名称。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
缺陷 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants