You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Please provide peekUTF8CString and withUTF8CString #32
Most UNIX APIs work in UTF-8, not UTF-16. Rather than having to write wrappers that encode/decode UTF-8 and run ByteString's packCString and useAsCString functions (and the corresponding ...Len variants), please consider providing these functions directly in either Data.Text.Foreign or Data.Text.Encoding. Such wrappers would make c2hs bindings easier to write.
That commit added the Len variants, but not the peekUTF8CString and withUTF8CString functions needed to work with the much more common NUL-terminated UTF-8. Could you please add that pair of functions as well?
Activity
bos commentedon Jan 15, 2013
Happy to consider this, if you've an idea of what the APIs should specifically look like.
joshtriplett commentedon Jan 15, 2013
Same type signatures as peekCString and withCString, using the CString type, but accepting/producing UTF-8 respectively.
Implement peekCStringLen and withCStringLen (gh-32)
joshtriplett commentedon Sep 22, 2013
That commit added the Len variants, but not the peekUTF8CString and withUTF8CString functions needed to work with the much more common NUL-terminated UTF-8. Could you please add that pair of functions as well?
Add peekCString, withCString for converting NUL terminated C strings
Add peekCString, withCString for converting NUL terminated C strings
Add peekCString, withCString for converting NUL terminated C strings
Add peekCString, withCString for converting NUL terminated C strings