aaData return NULL when there are special characters åäö
aaData return NULL when there are special characters åäö
Hi,
I have a problem when using the example code for server side processing.
All instances from the table in the databadse with characters 'åäö' is being replaced with null in aaData array for output. The result is being that the Info with 'åäö' is not showing in the table.
The aaData array:
"aaData":[["1","Maria","Norling","680410"],["2","Daniel ",null,"7504015"]]}
The database:
1 Maria Norling 680410
2 Daniel Zetterström 750401
Does anyone have a solution for this?
/P
I have a problem when using the example code for server side processing.
All instances from the table in the databadse with characters 'åäö' is being replaced with null in aaData array for output. The result is being that the Info with 'åäö' is not showing in the table.
The aaData array:
"aaData":[["1","Maria","Norling","680410"],["2","Daniel ",null,"7504015"]]}
The database:
1 Maria Norling 680410
2 Daniel Zetterström 750401
Does anyone have a solution for this?
/P
This discussion has been closed.
Replies
I have solved the problem myself and i thaught I posted it if anyone else would have same issues.
UTF-8 encode the output.
Change:
$row[] = $aRow[ $aColumns[$i] ];
To:
$row[] = utf8_encode($aRow[ $aColumns[$i] ]);
Please post any other solution that is more simple than this. One where you dont need to encode all of your output.
/P
Allan