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
We somehow got some non-ASCII text into our Sail code:
The trap handler function address is obtained from the current privilege mode’s
(note the weird ' in mode’s)
If you compile this to JSON using sail, it writes it out as-is (i.e. with UTF-8) encoding. However Ruby idiotically defaults to ASCII when reading files, and it throws an error:
/var/lib/gems/3.0.0/gems/json-2.9.0/lib/json/common.rb:221:in `encode': asciidoctor: FAILED: /build/src/riscv-cheri.adoc: Failed to load AsciiDoc document - "\\xE2" on US-ASCII (Encoding::InvalidByteSequenceError)
from /var/lib/gems/3.0.0/gems/json-2.9.0/lib/json/common.rb:221:in `parse'
from /var/lib/gems/3.0.0/gems/json-2.9.0/lib/json/common.rb:221:in `parse'
from /var/lib/gems/3.0.0/gems/asciidoctor-sail-0.2/lib/asciidoctor-sail/sources.rb:18:in `register'
from /var/lib/gems/3.0.0/gems/asciidoctor-sail-0.2/lib/asciidoctor-sail/macros.rb:15:in `get_sourcemap'
from /var/lib/gems/3.0.0/gems/asciidoctor-sail-0.2/lib/asciidoctor-sail/macros.rb:133:in `get_source'
from /var/lib/gems/3.0.0/gems/asciidoctor-sail-0.2/lib/asciidoctor-sail/macros.rb:210:in `process'
We somehow got some non-ASCII text into our Sail code:
(note the weird ' in
mode’s
)If you compile this to JSON using
sail
, it writes it out as-is (i.e. with UTF-8) encoding. However Ruby idiotically defaults to ASCII when reading files, and it throws an error:According to ChatGPT this should work:
The text was updated successfully, but these errors were encountered: