Commit 768b903d authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Encode to byte before converting

parent beb2157c
......@@ -848,7 +848,7 @@ _NO_DEFAULT = _NoDefault()
def _string_to_length_and_void_p(string):
if isinstance(string, TXTRecord):
string = str(string)
string = str(string).encode('utf-8')
void_p = ctypes.cast(ctypes.c_char_p(string), ctypes.c_void_p)
return len(string), void_p
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment