Hi,
I want to cast a string generated by flatty (a serialization lib) to a cstring.
But when the string contains a char with value over 127 the string gets
completly wrong. I guess that has something todo with chars over 127 normaly
indicating the beginning of a utf8 char, but not being a correct utf8 char?
Heres the code of a little isolated test of the problem:
import flatty
let str = toFlatty(128)
for c in str: echo ord(c)
echo "-"
for c in cstring(str): echo ord(c)
Run
result: `128 0 - 37 56 48 0`
thanks,
chol