webismymind / editablegrid

EditableGrid is an open source Javascript library aimed at turning HTML tables into advanced editable components. It focuses on simplicity: only a few lines of code are required to get your first table up and running.
http://www.editablegrid.net
Other
795 stars 272 forks source link

Not showing danish character #142

Closed GertAC closed 7 years ago

GertAC commented 7 years ago

I am getting my data from Mysql, set up with utf8mb4_danish_ci. The grid is not showing special danish character.

RØR (pipe) is just showing RR

What can i do ? /Gert

ramonYcajal commented 7 years ago

hi! this grid tries to make me crazy but it can´t do it!!! hahahaha I think that your problem is in the metacharset. In the html file where you load the grid and you have all the scripts of this grid that you need, in the head tag, try to ad this: meta charset ="utf-8" meta http-equiv="Content-Type" content="text/html; charset=utf-8" meta http-equiv="X-UA-Compatible" content="IE=edge" This is for HTML 5 , I think that if you only type the first line meta charset ="utf-8" it works to....

pd: wrap each line with <> of html ;)

GertAC commented 7 years ago

Hi Ramon Thanx for the interest. I had them already, so It is still not working. I can receive data correctly from my DB on the same page manual with $mysqli->query.....

/Gert

GertAC commented 7 years ago

Hi I found a solution myself :-) change loaddata.php to:

// Database connection $mysqli = mysqli_init(); $mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 5); $mysqli->real_connect($config['db_host'],$config['db_user'],$config['db_password'],$config['db_name']); $mysqli->set_charset("utf8");