]> 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)
committerCarl Sorensen <c_sorensen@byu.edu>
Sun, 1 May 2011 20:07:59 +0000 (14:07 -0600)
commitd6fcf3af68676af106c285919b15050c44ed36c8
tree58931472524e10278d99ea011fac4cfc6d598a6f
parent7d8df7fea59e341b2738d7d1d72d5ca181590ae6
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