Anomalie #8254
[ANALYSE] impossible de faire la recherche sur document ocerisé
Description
lorsque j’exécute le batch du fulltext, j'ai comme résultat en base la valeur 1 mais dans les logs j'obtiens une erreur
error 1 'from line 77 : iconv(): Detected an illegal character in input string'
Info 0 'FULLTEXT OK'
Du coup, je ne peux pas faire de recherche sur le contenu du courrier.
Dans ce fichier, il y a des caractères accentués en majuscule exemple É OU È. ces caractères ne sont pas reconnus par la commande iconv.
Dans la doc de la commande iconv : http://php.net/manual/fr/function.iconv.php
on a:
$text = "Ceci est le symbole de l'Euro '€'.";
echo 'Original : ', $text, PHP_EOL;
echo 'TRANSLIT : ', iconv("UTF-8", "ISO-8859-1//TRANSLIT", $text), PHP_EOL;
echo 'IGNORE : ', iconv("UTF-8", "ISO-8859-1//IGNORE", $text), PHP_EOL;
echo 'Brut : ', iconv("UTF-8", "ISO-8859-1", $text), PHP_EOL;
Dans le code de l'appli, on a dans le fichier /var/www/html/maarch1706/apps/maarch_entreprise/tools/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8.php à la ligne 77:
/**
* Reset token stream
*/
public function reset()
{
$this->_position = 0;
$this->_bytePosition = 0;
// convert input into UTF-8 if (strcasecmp($this->_encoding, 'utf8' ) != 0 && strcasecmp($this->_encoding, 'utf-8') != 0 ) { $this->_input = iconv($this->_encoding, 'UTF-8', $this->_input); $this->_encoding = 'UTF-8'; } }
Je pense qu'il faut ajuster la commande avec
$this->_input = iconv($this->_encoding//TRANSLIT, 'UTF-8', $this->_input);
ou
$this->_input = iconv($this->_encoding//IGNORE, 'UTF-8', $this->_input);
Related issues
History
#2 Updated by Emmanuel DILLARD over 3 years ago
- Status changed from A traiter to Prêt à développer
#3 Updated by Emmanuel DILLARD over 3 years ago
- Status changed from Prêt à développer to 17
- Priority changed from 2-Sérieux to 3-Mineur
#4 Updated by Emmanuel DILLARD over 3 years ago
- Subject changed from impossible de faire la recherche sur document ocrisé to [ANALYSE] impossible de faire la recherche sur document ocerisé
- Status changed from 17 to Prêt à développer
- Target version changed from 17.06 to 19.04 (Support sécurité)
#5 Updated by Emmanuel DILLARD about 3 years ago
- Related to Anomalie #10249: Plantage indexation Lucene et contournement_caractères spéciaux added
#6 Updated by Emmanuel DILLARD about 3 years ago
- Project changed from Backlog to CURRENT SPRINT
- Status changed from Prêt à développer to En cours de dev (S)
- Target version changed from 19.04 (Support sécurité) to 20.03 (Support restreint)
- Tags Courrier 18.10.8 added
#9 Updated by Emmanuel DILLARD about 3 years ago
Analyse effectuée.
Non reproductible
#10 Updated by Emmanuel DILLARD about 3 years ago
- Tags Courrier deleted (
18.10.8)
#11 Updated by Emmanuel DILLARD about 3 years ago
- Project changed from CURRENT SPRINT to Backlog
- Status changed from En cours de dev (S) to Développé / Analysé (S)
#16 Updated by Emmanuel DILLARD 12 months ago
- Project changed from Backlog to Backlog Courrier
- Target version changed from 20.03 (Support restreint) to 20.03 (Restreint)