Closed rvillalob closed 6 years ago
I was wrong the first time. The reason the function doesn't work is because the loop's test condition should be c >= prefix instead of c > prefix
You are right. (see https://github.com/rfivet/cigue/commit/2cef0714926cc119c57b096fab3cf70520ff21c5)
I may be mistaken, but I think the function unicode_to_utf8 is broken. Although it is able to generate the continuation bytes of the UTF8 sequence, it fails to produce the correct leading byte.