Problem showing accents
Problem showing accents
panuque
Posts: 4Questions: 0Answers: 0
Hello,
First of all, thanks to all those who have developed DataTables, is a great plugin and it has speeded up the job.
I am having a problem when it comes to show a table in the grid. I'm actually showing a view as I have to relate multiple tables and display different fields in each 1 of them. Specifically, I'm having a problem when displaying a field in which some values have accents. These values are not displayed in the grid are blank. If I run the script that generates the JSON, I get those fields to null value. Why does this happen?
Thank you.
First of all, thanks to all those who have developed DataTables, is a great plugin and it has speeded up the job.
I am having a problem when it comes to show a table in the grid. I'm actually showing a view as I have to relate multiple tables and display different fields in each 1 of them. Specifically, I'm having a problem when displaying a field in which some values have accents. These values are not displayed in the grid are blank. If I run the script that generates the JSON, I get those fields to null value. Why does this happen?
Thank you.
This discussion has been closed.
Replies
Thank you :-)
> I am having a problem when it comes to show a table in the grid
So a TABLE inside the TABLE that you are using for the DataTable? If you disable DataTables on the top table, does it work as you would expect?
Allan
I have a table with foreign keys to other tables, for example, these tables with these fields:
customer (name, idtype) -> idtype references table 'type'
type (id, name)
Where 'idtype' is the foreign key to another table. Well, if the script that loads the data in the table lay the table 'client', I get everything right, with 2 fields. But I just want to show me the value of 'name' of the table type, I mean? So I tried to create a view like this:
create view ... select c.name, t.name FROM customer c, type = t where t.id c.idType;
After this, in the script where the data for the charge DataTables, when selecting the table, I put the name of the view (and the corresponding fields of view I want to show). Everything goes well except the fields that have accents and special characters.
Thank you again ;)
What character encoding is your web-page, and what character encoding is your database? there might be a mismatch between the two.
Allan
My meta tag in the html page is:
[code]
[/code]
and database encoding is
[code]
charset: utf8
collation: utf8_general_ci
[/code]
im so confused :S
Again thanks ;)
Allan
It's not likely that the database will be an issue either. As you've already shown, it's set to use UTF-8.
The issue could be with the interpreter (PHP or whatnot) but I don't think so. I don't know enough about interpreters to say for sure. Based on what I know about the whole web stack, it's much more likely to be the web server itself (Apache or IIS in most cases), which is the part of the stack responsible for finally packaging up the document and sending it along.