X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpdf-scheme.cc;h=61cf382e6b45e21955f87d34df57609fc39b48a7;hb=750b714488c5af6eae22d07163bba8b554734ac6;hp=da2ce2cef3c74b8346ef707eda37d1006111e3c1;hpb=207f71b8b2ab9ca550e841615bedce393e652ca6;p=lilypond.git diff --git a/lily/pdf-scheme.cc b/lily/pdf-scheme.cc index da2ce2cef3..61cf382e6b 100644 --- a/lily/pdf-scheme.cc +++ b/lily/pdf-scheme.cc @@ -84,14 +84,16 @@ LY_DEFINE (ly_encode_string_for_pdf, "ly:encode-string-for-pdf", free (p); /* Convert back to SCM object and return it */ - /* FIXME guile-2.0: With guile 2.0 the internal representation of a string - * has changed (char vector rather than binary bytes in - * UTF-8). However, with guile 2.0, ly:encode-string-for-pdf - * is no longer needed and can be replaced by the new - * (string->utf16 str 'big) - */ if (g) - return scm_take_str (g, bytes_written); // scm_take_str eventually frees g! + { + /* + * Return the raw byte representation of the UTF-16BE encoded string, + * in a locale independent way. + */ + SCM string = scm_from_latin1_stringn (g, bytes_written); + free(g); + return string; + } else return str; }