Menu

#5834 Fix most encoding problems with Guile 2.x

Fixed
Enhancement
2020-03-11
2020-03-07
No

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.

http://codereview.appspot.com/555420043

Discussion

  • Anonymous

    Anonymous - 2020-03-07
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2020-03-07

    Passes make, make check and a full make doc.

    (note I am testing with only guile 1.8 installed - if that matters?)

     
    • Jonas Hahnfeld

      Jonas Hahnfeld - 2020-03-08

      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.x

       
  • Anonymous

    Anonymous - 2020-03-09
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2020-03-09

    Patch on coumntdown for March 11th.

     
  • Anonymous

    Anonymous - 2020-03-11
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2020-03-11

    Patch counted down, please push.

     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2020-03-11
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: push -->
     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2020-03-11
    commit f756cab383d91faa6430a1c7f1b041f7855721a9
    Author:     Jonas Hahnfeld <hahnjo@hahnjo.de>
    AuthorDate: Sat Mar 7 19:44:48 2020 +0100
    Commit:     Jonas Hahnfeld <hahnjo@hahnjo.de>
    CommitDate: Wed Mar 11 08:24:23 2020 +0100
    
        Issue 5834/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.
    
    commit cbac8d5d3113b2b224956b555c147ccc230ab14a
    Author:     Jonas Hahnfeld <hahnjo@hahnjo.de>
    AuthorDate: Sat Mar 7 00:03:15 2020 +0100
    Commit:     Jonas Hahnfeld <hahnjo@hahnjo.de>
    CommitDate: Wed Mar 11 08:24:23 2020 +0100
    
        Issue 5834/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.
    
     
MongoDB Logo MongoDB