lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: meta-data with guile2


From: Masamichi Hosoda
Subject: Re: meta-data with guile2
Date: Sat, 19 Nov 2016 21:28:30 +0900 (JST)

> Hi,
> 
> this is a single problem from
> http://lists.gnu.org/archive/html/lilypond-devel/2016-11/msg00090.html
> about pdf-meta-data with guile2
> 
> In framework-ps.scm we have `metadata-encode' defined as part of
> `handle-metadata'
> There's the comment:
>     ;; First, call ly:encode-string-for-pdf to encode the string (latin1 or
>     ;; utf-16be), then escape all parentheses and backslashes
>     ;; FIXME guile-2.0: use (string->utf16 str 'big) instead
> 
> `handle-metadata' finally returns
> (ps-quote (ly:encode-string-for-pdf val))
> 
> Why did we do so at all?
> In my (ofcourse limited) testings I see no difference doing directly:
> (ps-quote val)
> instead.

Non-Latin-1 strings (like Japanese strings)
in PDF metadata must be expressed in UTF-16BE encoding.
`ly:encode-string-for-pdf` converts such strings
to UTF-16BE encoding strings.

If you use directly `(ps-quote val)`, non-Latin-1 strings will broken.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]