PHP MongoDB find with UTF-8 -
I have a text search with MongoDB that I use with PHP.
It works fine except for special characters German language As the word "Tauran"
then the letters "o", "ü", "Ä", "ß" can not be found and why I do not know.
This Jason is to be generated for search:
{"text": "Waypoints", "search": "t \ u00f6rn", "language": "De"}
I tried
utf8_encode (utf8_decode ($ search));
and
mb_convert_encoding ($ is searched for, "UTF-8");
Yet none of them received the results. Search string in $ search
, in this case "toran" will be saved.
This is my order for Textchurch:
$ cursor = $ it- & gt; DB- & gt; Command (array ("text" = & gt; "path points", 'search' => $ search, 'language' => gt; 'de'));
How can I work with these characters correctly?
I have the 'language' = & gt; Removed 'd' part of the command, now it is working!
But I am not able to give a reason because the language parameter slips this query.
Comments
Post a Comment