Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(253)

Issue 322930043: Fix the encoding of the PDF metadata when using guile-2.0 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 11 months ago by thomasmorley651
Modified:
3 years, 11 months ago
Reviewers:
lemzwerg
CC:
lilypond-devel_gnu.org, ao2_ao2.it
Visibility:
Public.

Description

Fix the encoding of the PDF metadata when using guile-2.0 Postscript files are encoded in Latin1, but PDF metadata has to be encoded in UTF-16BE. ly:encode-string-for-pdf takes care of that but it was not working properly with guile-2.0 because the internal representation of strings in guile-2.0 has changed and the actual destination encoding has to be specified explicitly, especially when it's different from the current locale. Passing the encoded metadata as Latin1 corresponds to pass its raw byte representation, and this is enough to make things work. This also gets rid of a misleading warning: "`scm_take_str' is deprecated. Use scm_take_locale_stringn instead." This change is compatible with guile-1.8 so the FIXME comment in lily/pdf-scheme.cc has been removed. A note was added to scm/framework-ps.scm to suggest a possible implementation in scheme of ly_encode_for_pdf(), just in case of a possible future cleanup.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -9 lines) Patch
M lily/pdf-scheme.cc View 1 chunk +9 lines, -7 lines 0 comments Download
M scm/framework-ps.scm View 1 chunk +8 lines, -2 lines 2 comments Download

Messages

Total messages: 3
thomasmorley651
This is one of Antonio's set of patches to make LilyPond work with guile-2.x. And ...
6 years, 11 months ago (2017-05-01 12:44:48 UTC) #1
lemzwerg
LGTM https://codereview.appspot.com/322930043/diff/1/scm/framework-ps.scm File scm/framework-ps.scm (right): https://codereview.appspot.com/322930043/diff/1/scm/framework-ps.scm#newcode604 scm/framework-ps.scm:604: ;; could be replaced with the followng code: ...
6 years, 11 months ago (2017-05-01 18:39:29 UTC) #2
thomasmorley651
6 years, 11 months ago (2017-05-01 19:22:02 UTC) #3
Thanks for review.

https://codereview.appspot.com/322930043/diff/1/scm/framework-ps.scm
File scm/framework-ps.scm (right):

https://codereview.appspot.com/322930043/diff/1/scm/framework-ps.scm#newcode604
scm/framework-ps.scm:604: ;; could be replaced with the followng code:
On 2017/05/01 18:39:29, lemzwerg wrote:
> s/followng/following/

Done.
I'll not upload a new patch for the typo, though.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b