I convert below function
fun CharsettoUTF8(CharsetName: String, input:String) : String { if (input.length <= 0) return "" val buf