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.
Diff:
Passes make, make check and a full make doc.
Patch on countdown for May 6th.
Hi,
is there any way I can be credited for the patch?
I am the original author.
If using
git commit --author="Antonio Ospite <ao2@ao2.it>"
is not an option, having my name in the commit message could be enough.Thank you Thomas for taking the time to have the patch merged.
Ciao,
Antonio
Hi Antonio,
sorry for the late reply, I didn't notice your post before. Thanks James pointing me to it.
The plan is to merge all patches about guile-2.x into master (with if-guile2-conditions where needed).
Giving proper credits is an important point for me.
The current one is the (apart from correcting a typo) unchanged patch of yours, so you are the author and ofcourse it is stated in the patch.
You can't see it on Rietveld, because only the commit-message is shown.
I've already put some patches of my own into master, also some where I replace a patch of yours by own ones. For those I took myself as the author. Where I extended a patch of yours you are mentioned in the commit-message.
http://git.savannah.gnu.org/cgit/lilypond.git/commit/?id=98b662a091d78893004ee5f7cf4f7e9a6d811f57
http://git.savannah.gnu.org/cgit/lilypond.git/commit/?id=fa2ab0d0c049e84e6b6a4839710f849cbbc61d08
http://git.savannah.gnu.org/cgit/lilypond.git/commit/?id=c7e5396bb1d191783265512284f8131a7b5ada74
http://git.savannah.gnu.org/cgit/lilypond.git/commit/?id=0ccac4adf83c431b5d1c89bebfd6a916369328dd
http://git.savannah.gnu.org/cgit/lilypond.git/commit/?id=e9ae1cb3b093498ccb9d5f7348c755a3243bbccc
Is this ok with you?
In general I tackled minor issues first, but those are mostly done now, so you'll see more of your patches on review in the near future.
Many thanks again for your hard work!!
Cheers,
Harm
Patch counted down - please push. - see previous note from Antonio.
pushed to staging as:
commit db449e3935bc8b765979e1d4a4ab3018908cbbd8
Author: Antonio Ospite ao2@ao2.it
Date: Sat Nov 19 15:27:15 2016 +0100
Thanks Thomas, I was asking just because I didn't see my name on https://codereview.appspot.com/322930043
I also appreciate that you are mentioning my name in the commit message for the patches that I started but then left unfinished.
Ciao ciao,
Antonio