Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

resolves #481, #301 encode anchors containing characters outside ASCII range in hex #499

Merged
merged 1 commit into from
Aug 8, 2016

Conversation

mojavelinux
Copy link
Member

@mojavelinux mojavelinux commented Aug 7, 2016

  • hex encode anchors that contain characters outside the ASCII range
  • squelch the following warning: regexp match /.../n against to UTF-8 string (pdf-core < 0.6.1)

@mojavelinux
Copy link
Member Author

Technically, the cross references work when using pdf-core 0.6.1. However, since the file stream is written in binary encoding (ASCII-8BIT), it's best that all raw strings be encoded into an ASCII compatible string. Otherwise, the characters are very cryptic when looking at the raw PDF source and thus hard to analyze and test.

@mojavelinux
Copy link
Member Author

Use the following to unencode references in the PDF source that begin with 0x.

[value[2..-1]].pack 'H*'

…haracters outside ASCII range in hex

- hex encode anchors that contain characters outside the ASCII range
- squelch the following warning: regexp match /.../n against to UTF-8 string (pdf-core < 0.6.1)
@mojavelinux mojavelinux merged commit c3955c5 into asciidoctor:master Aug 8, 2016
@mojavelinux mojavelinux deleted the issue-481 branch August 8, 2016 06:22
fapdash pushed a commit to vogellacompany/asciidoctor-pdf that referenced this pull request Dec 13, 2016
…haracters outside ASCII range in hex (PR asciidoctor#499)

- hex encode anchors that contain characters outside the ASCII range
- squelch the following warning: regexp match /.../n against to UTF-8 string (pdf-core < 0.6.1)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant