Fix utf8 conversion (#1121)

This commit is contained in:
ilmat192
2017-12-12 17:30:50 +07:00
committed by Nikolay Igotti
parent 8fa8e2ebc8
commit cba7319e98
21 changed files with 709 additions and 43 deletions
@@ -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 {