-
Notifications
You must be signed in to change notification settings - Fork 498
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 regexp warnings #69
Comments
This is actually known. Personally, I consider this to be an errant warning in Prawn, but there's nothing I've been able to do about it so far. Perhaps we need to gather more info (determine if there is anything to worry about) and pursue upstream in Prawn. |
Hello, I am also getting this info, but what really worries me, only ASCII characters gets passed in. For this adoc file I get my national letters stripped out of my name:
|
It's slightly different. The source file is already marked with the UTF-8 encoding header. The problem is that the regular expression has the 8-BIT ASCII encoding modifier (see https://github.com/prawnpdf/pdf-core/blob/master/lib/pdf/core/pdf_object.rb#L61), which frankly I just don't understand why this is necessary. Either way, this is an upstream issue. (Keep in mind we are on an older version of pdf-core atm, so we'd need to upgrade if it gets fixed/changed).
It doesn't matter. Both Asciidoctor and Prawn force all strings to UTF-8 encoding. That's further reason why this is a completely errant warning, because the regular expression in question is not violating any encoding assumptions. |
That's a separate issue. Asciidoctor PDF uses custom fonts. When I created the font files that are bundled in the gem, I did not include all international characters in the font (something I've been meaning to fix). This is a valid test case that demonstrates this problem. Could you file a separate issue? |
Done as #72 , thanks for the explanation. |
Great! Thanks @miko! |
Turns out this was a bug in Asciidoctor PDF. When setting the value of a PDF metadata field, the content must be encoded if it includes glyphs that fall outside the WINANSI code set. We now check for this and encode the value properly. |
This was resolved by 0310c3e. |
I am still getting
when compiling this file:
Notepad2 says the file is "UTF8 Signature". Asciidoctor-pdf has version asciidoctor-pdf-1.5.0.alpha.9. And I am on Windows. |
I am seeing these warnings appear when run from asciidoctor-gradle-plugin
The text was updated successfully, but these errors were encountered: