]> git.donarmstrong.com Git - lilypond.git/commit
pdf-metadata: Use UTF-16BE for metadata if required
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 12 Apr 2011 11:47:04 +0000 (13:47 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Sat, 16 Apr 2011 20:36:51 +0000 (22:36 +0200)
commitdffe04e8e1a7c0b94fdfc30e44fe141dfbe7cbec
tree779f485398d81d964b7827242b168f6e8493a650
parent6afd86a9bcf31f5f42ce839b79e82e356f36a830
pdf-metadata: Use UTF-16BE for metadata if required

All Latin1 metadata strings need to be printed out to the .ps file
in Latin1 (NOT in UTF-8), and all non-Latin1 strings need to use
UTF-16BE encoding.
The escaping of parentheses and backslashes needs to be applied
AFTER encoding the string (since the escaping is required to correctly
detect the end of the encoding string when reading the byte-sequence
of the encoded string from the file. Basically, we are dumping a binary
sequence to the file, enclosed by parentheses. All \051 bytes need
to be escaped to make sure they are not detected as the closing
parenthesis.)
input/regression/pdfmark-metadata-unicode.ly [new file with mode: 0644]
lily/pdf-scheme.cc [new file with mode: 0644]
scm/framework-ps.scm