Fix utf8 conversion (#1121)
This commit is contained in:
@@ -33,7 +33,7 @@ class CUrl(val url: String) {
|
||||
|
||||
fun CPointer<ByteVar>.toKString(length: Int): String {
|
||||
val bytes = this.readBytes(length)
|
||||
return kotlin.text.fromUtf8Array(bytes, 0, bytes.size)
|
||||
return bytes.stringFromUtf8()
|
||||
}
|
||||
|
||||
fun header_callback(buffer: CPointer<ByteVar>?, size: size_t, nitems: size_t, userdata: COpaquePointer?): size_t {
|
||||
|
||||
Reference in New Issue
Block a user