[Top][All Lists]

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

Re: meta-data with guile2

From: Antonio Ospite
Subject: Re: meta-data with guile2
Date: Sat, 19 Nov 2016 13:21:57 +0100

On Sat, 19 Nov 2016 13:09:08 +0100
Thomas Morley <address@hidden> wrote:

> Hi,
> this is a single problem from
> 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?

I am not sure if this is a requirement of the PDF spec that metadata
has to be encoded in UTF-16 if wide characters are present.

> In my (ofcourse limited) testings I see no difference doing directly:
> (ps-quote val)
> instead.

But that would still not solve the problem about the substitution of
wide characters (try with the japanese text in metadata) when writing to
the postscript file port which has a latin1 encoding, would it?

BTW, I found a way to make your test file work, I am preparing a
reply to your previous message, just waiting for "make LANGS='' doc" to
complete... which takes a while here.


Antonio Ospite

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

reply via email to

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