Your program asserts for me.
I've modifed it to print offending chars.
Here is the list
char   23a U:  23a L: 2c65
char   23e U:  23e L: 2c66
char   23f U: 2c7e L:  23f
char   240 U: 2c7f L:  240
char   250 U: 2c6f L:  250
char   251 U: 2c6d L:  251
char   252 U: 2c70 L:  252
char   265 U: a78d L:  265
char   266 U: a7aa L:  266
char   26b U: 2c62 L:  26b
char   271 U: 2c6e L:  271
char   27d U: 2c64 L:  27d

Only UTF-8 is a problem though.