Skip to content

Conversation

atf1206
Copy link

@atf1206 atf1206 commented Jul 12, 2020

The current implementation calculates the length of the string to send by simply using len() on the string. However, the correct calculation (that kdb expects) is the length of the encoded string.

In latin-1 and ascii, these two are the same. However for extended characters such as those in the utf-8 char-set, a single character in a python string may be 2 or more encoded characters. Since QConnection now supports passing alternate encoding parameters, e.g. utf-8, this should be supported here as well -- otherwise qPython reports an error when trying to send extended chars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant