I get code from http://doc.silverstripe.org/framework/en/tutorials/5-dataobject-relationship-management
If I try Link Existing 'Student' that has name with cyrillic symbols: 'Цимбалюк'.
In
<input id="gridfield_relationsearch" class="text relation-search no-change-track ui-autocomplete-input ui-autocomplete-loading" type="text" placeholder="Find Students by Name" data-search-url="'admin/pages/edit/EditForm/field/Students/search'" name="gridfield_relationsearch" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true">
I enter the following characters 'Ци', SS create GET request
http://......../admin/pages/edit/EditForm/field/Students/search?Title=Content+personalization&URLSegment=content-personalization&MenuTitle=Content+personalization&Content=%3Cp%3EContent+personalization%3C%2Fp%3E&MetaTitle=&MetaKeywords=&MetaDescription=&ExtraMeta=&gridfield_relationsearch=%D0%A6%D0%B8&Students%5BGridState%5D=%7B%22GridFieldAddRelation%22%3A%5B%5D%2C%22GridFieldSortableHeader%22%3A%7B%22SortColumn%22%3A%5B%5D%7D%2C%22GridFieldFilterHeader%22%3A%7B%22Columns%22%3A%5B%5D%7D%2C%22GridFieldPaginator%22%3A%7B%22currentPage%22%3A1%7D%2C%22GridFieldSearchRelation%22%3A%5B%5D%7D&filter%5BName%5D=&gridfield_relationsearch=&Mentors%5BGridState%5D=%7B%22GridFieldAddRelation%22%3A%5B%5D%2C%22GridFieldSortableHeader%22%3A%7B%22SortColumn%22%3A%5B%5D%7D%2C%22GridFieldFilterHeader%22%3A%7B%22Columns%22%3A%5B%5D%7D%2C%22GridFieldPaginator%22%3A%7B%22currentPage%22%3A1%7D%2C%22GridFieldSearchRelation%22%3A%5B%5D%7D&filter%5BName%5D=&ClassName=Project&ParentID=7&SecurityID=da6568ad4a6d135ca97531800dc699d0211fe731&ID=9&AbsoluteLink=&LiveLink=http%3A%2F%2Fwebspilka.dev%2Favto-shrot%2Fprojects%2Fcontent-personalization%2F%3Fstage%3DLive&StageLink=http%3A%2F%2Fwebspilka.dev%2Favto-shrot%2Fprojects%2Fcontent-personalization%2F%3Fstage%3DStage&TreeTitle=%3Cspan+class%3D%22jstree-pageicon%22%3E%3C%2Fspan%3E%3Cspan+class%3D%22item%22%3EContent
+personalization%3C%2Fspan%3E&gridfield_relationsearch=%u0426%u0438
in framework/forms/gridfield/GridFieldAddExistingAutocompleter.php
public function doSearch ....
....
$stmts[] .= sprintf('"%s" LIKE \'%s%%\'', $searchField, Convert::raw2sql($request->getVar('gridfield_relationsearch')));
...
I get $request->getVar('gridfield_relationsearch')='%u0426%u0438'
And next query in mysql
SELECT DISTINCT "Student"."ClassName", "Student"."Created", "Student"."LastEdited", "Student"."Name", "Student"."University", "Student"."ProjectID", "Student"."ID", CASE WHEN "Student"."ClassName" IS NOT NULL THEN "Student"."ClassName" ELSE 'Student' END AS "RecordClassName" FROM "Student" WHERE ("Name" LIKE '%u0426%u0438%') AND ("Student"."ID" NOT IN (SELECT DISTINCT "Student"."ID" FROM "Student" WHERE ("ProjectID" = '9'))) ORDER BY "Student"."Name" ASC LIMIT 20
Why javascript codes variable in appearance '%u0426%u0438', not in '/u0426/u0438'?
How to decode the variable in php script?
Now MySQL receives encoded value:
"Name" LIKE 'Ци%'
I want send to MySQL decoded:
"Name" LIKE '%u0426%u0438%'