Topics

[espeak-ng:master] reported: Replacement character (U+FFFD) completely disturbs speak #github


espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Comment on Issue #859 Replacement character (U+FFFD) completely disturbs speak
By jaacoppi:

https://github.com/espeak-ng/espeak-ng/blob/9e9c0a042b23d1b0ecd9871b5b60d56e9aeeca2f/src/libespeak-ng/readclause.c#L665-L668

Setting a printf("%x\n", c2); after those lines shows that GetC() returns 0xFFFF for U+FFFF and 0x FFFE for U+FFFE, but 0xEF and 0xBD for U+FFFD. The rest of the code then interprets those two symbols. That's where the extra garbage comes from.

The problem is probably somewhere in encoding.c since GetC() calls functions in it.