Closed auscompgeek closed 7 years ago
Thanks for doing this, can you add some weird unicode strings (like ©) to the existing unit tests, just so we can verify that it doesn't happen again in the future?
Hm. Looks like I misread ntcore.support.compat.
I guess the easy way out would be to consider bytestrings in Python 2 to be raw, but that might be problematic…
Value.make*
are public APIs, right? Is it documented that Value.makeString
can take non-strings (converting the value to a string)?
It's only vaguely public... users aren't expected to use ntcore.
Also, keep in mind that Value.makeString is used for incoming values from the network (py2: str, py3: bytes) and from NetworkTable.xxx apis (so.. whatever the user throws at it).
From discussion on Gitter:
Value.makeString
, so they are already Unicode.table.putString('foo', 'bar')
, instead of having to explicitly pass Unicode strings.Looks good, can you add a unicode test to the round trips in https://github.com/robotpy/pynetworktables/blob/master/tests/test_api.py?
Fixes #36.