Filtering on umlaut characters and other special characters
Filtering on umlaut characters and other special characters
It seems the search isn't handling chars like 'ñ', 'ö' or 'ü' or characters with accents, resulting in zero results.
The table however displays them correctly (when not filtering).
I'm using server-side script on a mssql db.
I've added urldecode functionality to the server-side php script, but this does not improve the search.
Has anyone found a way around this ?
Should I add an encode decode system to the fnFilter function itself ?
Can something be done using the fnFilter parameters like regex ? (I haven't succeeded using these options)
I can refer to these unsolved posts :
http://datatables.net/forums/discussion/9595/how-to-filter-results-with-special-characters-using-jquery-datatables-plugin/p1
http://datatables.net/forums/discussion/6620/filtering-characters-with-accent/p1
http://datatables.net/forums/discussion/5444/how-to-modify-filter-string-prior-to-filtering/p1
Here you say that js filtering of chars is an option.
http://datatables.net/forums/discussion/1266/ignore-accent-in-the-input-typetext/p1
I however want to filter on those chars. They actually exist in the db.
The table however displays them correctly (when not filtering).
I'm using server-side script on a mssql db.
I've added urldecode functionality to the server-side php script, but this does not improve the search.
Has anyone found a way around this ?
Should I add an encode decode system to the fnFilter function itself ?
Can something be done using the fnFilter parameters like regex ? (I haven't succeeded using these options)
I can refer to these unsolved posts :
http://datatables.net/forums/discussion/9595/how-to-filter-results-with-special-characters-using-jquery-datatables-plugin/p1
http://datatables.net/forums/discussion/6620/filtering-characters-with-accent/p1
http://datatables.net/forums/discussion/5444/how-to-modify-filter-string-prior-to-filtering/p1
Here you say that js filtering of chars is an option.
http://datatables.net/forums/discussion/1266/ignore-accent-in-the-input-typetext/p1
I however want to filter on those chars. They actually exist in the db.
This discussion has been closed.
Replies
Since the '%' is encoded to '\x', the php urlencode isn't doing what it should.
Added [code]header('Content-type: text/html; charset=UTF-8');
mb_internal_encoding('UTF-8');[/code]
to the server-processing page just in case.
Somehow parsing the jQuery to php $_GET vars doesn't like the url encode (or something like that).
Use utf8_decode in the server-processing.php
This is my filtering code (where I split the search data on pipes, so ColumnFilterWidgets work server-side)
[code] /* Filtering */
$sWhere = "";
if ( isset($_GET['sSearch']) && $_GET['sSearch'] != "" ) {
$sWhere = "WHERE ( ";
for ( $i=0 ; $i
if you use Serverside script how you can use ColumnFilterWidgets?
If i try, the dropdown Filter juts use the values of the shown results.
Markus