]> 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>
Sat, 30 Apr 2011 04:12:41 +0000 (22:12 -0600)
commiteece01e3958ec2557ebb7d5ed62d7545b6ee37ec
tree8bff99de6a07c62b11005be5822b9fb2fc3500da
parent9b8bc059ef1f4b932b9cd6ec522945cdcd99e1cb
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