-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editing annotation with non english caracters is not working #448
Comments
This was referenced Sep 12, 2016
tianhao64
pushed a commit
to tianhao64/pyvmomi
that referenced
this issue
Mar 21, 2017
…serializer to support serializing unicode chars We use string formatter to contruct serialization result. The template used is str(byte) in python2 even though when the val is unicode. This is fine when val only contains ASCII chars since python can encode them to str implicitly using ASCII encoding. But when the val is non-ASCII unicodes, the conversion fails. Fix it by using a unicode template to avoid the conversion.
tianhao64
pushed a commit
to tianhao64/pyvmomi
that referenced
this issue
Mar 21, 2017
…serializer to support serializing unicode chars We use string formatter to contruct serialization result. The template used is str(byte) in python2 even though when the val is unicode. This is fine when val only contains ASCII chars since python can encode them to str implicitly using ASCII encoding. But when the val is non-ASCII unicodes, the conversion fails. Fix it by using a unicode template to avoid the conversion.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To reproduce :
Result in :
I think to solve is simply to make sure that's writtern in unicode (the u before the quote) :
/usr/lib/python2.7/site-packages/pyVmomi/SoapAdapter.py
self.writer.write(u'<{0}{1}>{2}</{0}>'.format(info.name, attr, result))
Tester with version 6.0.0.2016.6.
The text was updated successfully, but these errors were encountered: