sebnow/text-tnetstrings-perl

TNetstrings do not round-trip UTF8-encoded strings

mlawren opened this issue · 0 comments

This might be more of an issue with the tnetstring specification rather than this module. I have submitted a patch to encode UTF8 strings so that they become bytes. This issue is about going the other way: there is no way for a tnetstring decoder to know when the string should be decoded as UTF8 again.

I think the proper solution is to leave the 's' as byte strings and add another type, say 'u' to indicate a utf8 string. Unfortunately the original tnetstrings web page (and community?) no longer seems to be around. I guess there isn't a spec owner as such, meaning that we would perhaps be forging our own path.