Fix encoding for go convertor
This commit is contained in:
parent
d00a34640a
commit
af82996226
@ -9,11 +9,11 @@
|
||||
extension String {
|
||||
func goStringBuffer() -> UnsafeMutablePointer<Int8> {
|
||||
if let pointer = (self as NSString)
|
||||
.cString(using: String.defaultCStringEncoding.rawValue) {
|
||||
.cString(using: String.Encoding.utf8.rawValue) {
|
||||
return UnsafeMutablePointer(mutating: pointer)
|
||||
}
|
||||
Logger.log("Convert goStringBuffer Fail!!!!", level: .error)
|
||||
let p = ("" as NSString).cString(using: String.defaultCStringEncoding.rawValue)!
|
||||
let p = ("" as NSString).cString(using: String.Encoding.utf8.rawValue)!
|
||||
return UnsafeMutablePointer(mutating: p)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user