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
When converting a UTF-8 file that contains non-Ascii characters (e.g: ¿, á, é) I get the error:
org.jruby.exceptions.RaiseException: (Encoding::CompatibilityError) incompatible encodings: UTF-8 and CP850
Using asciidoctor-maven-plugin, document works without the extension, and I double-check the files are in UTF-8.
Steps To Reproduce
Create a simple AsciiDoc document
= Título
Maravilloso documento, ¿verdad?
== Sub-sección
Dedicada a Ramón.
Convert with the extension
Additional Information
Solution found.
The issue seems to be in Document::read_asset here, but I'd like to check before filing an issue to main project.
For some reason, the Javascript string is encoded in Windows format and Asciidoctor triggers the issue when the string is inserted in a document with non-Ascii chars.
Forcing content.chomp to be UTF-8 with content.chomp.force_encoding("UTF-8") fixes the issue.
Calling read_asset with :normlize => true (ref) did nothing.
The text was updated successfully, but these errors were encountered:
Issue Overview
When converting a UTF-8 file that contains non-Ascii characters (e.g: ¿, á, é) I get the error:
Using asciidoctor-maven-plugin, document works without the extension, and I double-check the files are in UTF-8.
Steps To Reproduce
Additional Information
Solution found.
The issue seems to be in Document::read_asset here, but I'd like to check before filing an issue to main project.
For some reason, the Javascript string is encoded in Windows format and Asciidoctor triggers the issue when the string is inserted in a document with non-Ascii chars.
Forcing
content.chomp
to be UTF-8 withcontent.chomp.force_encoding("UTF-8")
fixes the issue.Calling read_asset with
:normlize => true
(ref) did nothing.The text was updated successfully, but these errors were encountered: