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