How to take receipt of an 8-bit string? #346
|
I'm trying to take receipt of a LuaSocket style of binary string (buffer), but can't find a way to avoid utf8 parsing. It looks like Since all Lua strings are supposed to support 8-bit, maybe |
Answered by
khvzak
Dec 24, 2023
Replies: 1 comment 1 reply
|
If you want to receive bytes (binary string) you can use LuaString directly or try bstr::BString type. |
1 reply
Answer selected by
drauschenbach
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to receive bytes (binary string) you can use LuaString directly or try bstr::BString type.
LuaString has ‘as_bytes’ method to get a slice of raw bytes