-
-
Notifications
You must be signed in to change notification settings - Fork 31
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 Support #78
Comments
Try #79 |
Hello,I've try
It's truncate some character such as "ภาษาไทย" will return "ภา". So I've change from :
TO :
Thank you. |
What about using a custom encoded string when setting the metadata? |
That would work, but there would be the problem that every time someone doesn't know that they should do their own encoding, they will have problems and open a new issue. |
@dealfonso One question, if the file says ANSI in the encoding, and the reason is in UTF-8 or another encoding, wouldn't this problem occur? Look, I sent UTF-8 and it doesn't work
But I did send ISO-8859-1
|
Honestly, I have not considered this topic before. A quick search on google [1] tells me that PDF seems not to consider character encoding in a general form. It considers that the encoding depends on the font, and depending on the font, the same character will show a representation or another. I don't know how this applies to the reason and so on. That is why my "quick answer" is that pdf does not support utf-8 and so the users needs to encode the characters depending on their needs. I'll read more about character encoding in the metadata. Do you have any source of info to read? |
But on text contents, metadata don't use fonts |
I did try FPDF, and it works with UTF-8,
But here doesn't work |
I try [#79 ] by encode metadata to UTF-16BE with BOM, everything is OK. Problem is, when I set string contain "\x0E\x28 " (ศ) or "\x0E\x29" (ษ) metadata is broken. For example, I set my string to "ภาษาไทย". I do dirty fixed by adding "(" or ")" at the beginning or end of string. So I add "(" to beginning of "ภาษาไทย" like this -> "(ภาษาไทย". Then my signature show like this: It display the text correctly but still has "(" in front of it. Is there a correct way to deal with this problem? Thank you. |
Feel free to make a PR with the fix 👍 |
Could you please check #84 Thank you. |
I am testing the signature -> set_metadata_props feature , but it's not show correctly.
My signing reason is "ทดสอบ"
Is it support utf-8 encoding?
Thank you.
The text was updated successfully, but these errors were encountered: