Skip to content
Snippets Groups Projects
Commit 87d2cdf5 authored by Laurent's avatar Laurent
Browse files

hotline #138010 Search auto-complete : force locale fr_FR.UTF-8

As grep command needs correct locale environment. Will see later for
other usages
parent 83e7a3e9
Branches
Tags
3 merge requests!4125master in,!4124hotline #138010 Search auto-complete : force locale fr_FR.UTF-8,!4116hotline #138010 Search auto-complete : force locale fr_FR.UTF-8
Pipeline #14015 failed with stage
in 30 minutes and 43 seconds
- ticket #138010 : Auto-complétion : correction de la prise en compte des accents
\ No newline at end of file
......@@ -78,12 +78,7 @@ class Bokeh_EngineEco_AutocompleteRequest {
return '[]';
}
if (isset($params['language'])
&& $params['language'] == 'fr')
putenv('LANG=fr_FR.UTF8');
$this->_loadEnvironment();
$results = Class_Autocomplete_Index::searchAll($startsWith);
$terms = Class_Autocomplete_IndexSearcher::extractTerms($startsWith);
$term_regex = '/('.implode('|', $terms).')/iu';
......
......@@ -75,6 +75,8 @@ class Class_Autocomplete_IndexSearcher {
public function search($file_path, $search_expression) {
$out=[];
$grep = $this->buildGrepCommand($search_expression);
putenv('LANG=fr_FR.UTF8');
exec($grep, $out);
return array_slice($out, 0, 10);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment