hyomin Posted October 21, 2017 Share Posted October 21, 2017 (edited) Hi guys, i was trying to load some korean strings from mariadb like "소말리아", "중국" and when it's loaded with dbPoll and look at it with outputChatBox its characters are replaced with question marks ( "소말리아" -> "????", "중국" -> "??" ) and when it's saved to mariadb, it also displays it as question marks i tried changing collation and connection collation of mariadb to both utf-8 and euckr(korean charset) but it didn't work i would be really gratefull if someone can solve this for me here's the code i used function loadNations() local qh = dbQuery(dbc,"select * from nations") local result = dbPoll(qh,-1) for i=1,#result do nations[i] = {} for k,v in pairs(result[i]) do nations[i][k] = v end end end function saveNations() local qh for i=1,#nations do for k,v in pairs(nations[i]) do dbExec(dbc,"update nations set `??`=? where nid=?",k,v,nations[i]["nid"]) end end end edit: solved, i had to provide charset when using dbConnect Edited October 21, 2017 by hyomin Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now