Skip to content

Commit

Permalink
Update conversion of Python strings to CF strings for Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
stevensmedia committed Dec 24, 2021
1 parent 25cc8ad commit b5af1b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gogrepoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2633,7 +2633,7 @@ def __init__(self):


def _CFSTR(self,py_string):
return CoreFoundation.CFStringCreateWithCString(None, py_string, CoreFoundation.kCFStringEncodingASCII)
return CoreFoundation.CFStringCreateWithCString(None, py_string.encode('utf-8'), CoreFoundation.kCFStringEncodingUTF8)

def raw_ptr(self,pyobjc_string):
return objc.pyobjc_id(pyobjc_string.nsstring())
Expand Down

0 comments on commit b5af1b7

Please sign in to comment.