Fix most encoding problems with Guile 2.x
Individual commits:
1) Treat possibly incomplete UTF-8 as binary
replace_special_characters checks that the substring doesn't start
mid-UTF-8, but it does not guarantee that it ends in a complete glyph.
So just explicitly treat it as binary when creating the SCM.
While modifying the function, avoid comparison of zero-length substrings.
2) Use UTF-8 for all conversions to / from Scheme
LilyPond really expects all input to be encoded in UTF-8, and we should
not let GUILE 2.x mangle with it.
Diff:
Passes make, make check and a full make doc.
(note I am testing with only guile 1.8 installed - if that matters?)
No, this is fine: Guile 1.8 stays the default for now and the compatibility
defines make sure that the change only affects Guile 2.xPatch on coumntdown for March 11th.
Patch counted down, please push.