• Adam Langley's avatar
    Parse .mojom as UTF-8. · a0ca4c05
    Adam Langley authored
    The parser called on the changed line demands a Python |str| type, but
    |contents| here can be a |unicode|. The |str| converter in Python 2
    assumes an ASCII encoding and thus throws an exception if any characters
    are > 127. This means that any changed .mojo files that contain non-ASCII
    characters cause a presubmit error. One can't remove those characters
    either because the presubmit parses the previous version of the file
    too. Thus all changes to .mojo file with non-ASCII characters are
    blocked without this.
    
    Change-Id: I887890590c8ad97a4fac60d19a8bebce439abacc
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2223973
    Commit-Queue: Adam Langley <agl@chromium.org>
    Auto-Submit: Adam Langley <agl@chromium.org>
    Reviewed-by: default avatarKen Rockot <rockot@google.com>
    Cr-Commit-Position: refs/heads/master@{#773768}
    a0ca4c05
check_stable_mojom_compatibility.py 5.7 KB