Hello everybody
Could you give simple way to conver text loaded from web with GBK charset to UTF-8 and after insert data in mysql table (UTF-8 charset for table)
There is how I get content with GBK charset:
var content = URL(“http://somesite.ch”).readText(Charset.forName(“GBK”))
There is how insert:
var connection = DriverManager.getConnection(url, user, password)
var stm = connection.prepareStatement(query)
stm.setString(1, content)
stm.executeUpdate()
If print data I get -> 女式上装
After inserting I get ???