]> git.donarmstrong.com Git - lilypond.git/commit
Issue 5130 Fix the encoding of the PDF metadata when using guile-2.0
authorAntonio Ospite <ao2@ao2.it>
Sat, 19 Nov 2016 14:27:15 +0000 (15:27 +0100)
committerThomas Morley <thomasmorley65@gmail.com>
Sat, 6 May 2017 09:45:12 +0000 (11:45 +0200)
commitdb449e3935bc8b765979e1d4a4ab3018908cbbd8
treec141d357b912b8993afbda3449f68092fe4dc00d
parent6b5c2fe707c1dfaacdf574027d281288eed8baa3
Issue 5130 Fix the encoding of the PDF metadata when using guile-2.0

Postscript files are encoded in Latin1, but PDF metadata has to be
encoded in UTF-16BE.

ly:encode-string-for-pdf takes care of that but it was not working
properly with guile-2.0 because the internal representation of strings
in guile-2.0 has changed and the actual destination encoding has to be
specified explicitly, especially when it's different from the current
locale.

Passing the encoded metadata as Latin1 corresponds to pass its raw byte
representation, and this is enough to make things work.

This also gets rid of a misleading warning:
  "`scm_take_str' is deprecated. Use scm_take_locale_stringn instead."

This change is compatible with guile-1.8 so the FIXME comment in
lily/pdf-scheme.cc has been removed. A note was added to
scm/framework-ps.scm to suggest a possible implementation in scheme of
ly_encode_for_pdf(), just in case of a possible future cleanup.
lily/pdf-scheme.cc
scm/framework-ps.scm