Skip to content

Instantly share code, notes, and snippets.

@coke
Last active July 24, 2017 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coke/1050613c805eca4bb41c801aa3ad5f51 to your computer and use it in GitHub Desktop.
Save coke/1050613c805eca4bb41c801aa3ad5f51 to your computer and use it in GitHub Desktop.
malformed utf8 on mac only
first line of decode_utf8_byte is now:
fprintf(stderr,"byte is %i\n", byte);
printed out BARF3 just before https://github.com/MoarVM/MoarVM/blob/master/src/strings/utf8.c#L496
Processing the output of perl6 --doc doc/Type/List.pod6 via run's .out,
the last invocation of nqp::decodertakeline of consume-line-chars
in src/core/Encoding/Decoder/Builtin.pm then emits
Ignoring the bytes after the BARF3, as they are "Malformed UTF-8" :)
byte is 171
BARF3
byte is 77
byte is 97
byte is 108
byte is 102
byte is 111
byte is 114
byte is 109
byte is 101
byte is 100
byte is 32
byte is 85
byte is 84
byte is 70
byte is 45
byte is 56
Malformed UTF-8
---
The bytes from the previous line are:
byte is 32
byte is 32
byte is 32
byte is 32
byte is 35 (#)
byte is 32
byte is 79 (O)
byte is 85 (U)
byte is 84 (T)
byte is 80 (P)
byte is 85 (U)
byte is 84 (T)
byte is 58 (:)
byte is 32
byte is 194
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment