Changeset 79993 in spip-zone


Ignore:
Timestamp:
Jan 12, 2014, 4:33:35 PM (7 years ago)
Author:
patfr@…
Message:

Mots-croisés : attention aux alphabets utf8...

Location:
_plugins_/jeux/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/jeux/trunk/jeux/mots_croises.php

    r79919 r79993  
    131131function calcul_tableau_grille($texte){
    132132        $texte = preg_replace(",\s?[\r\n]+\s?,", "\n", trim($texte));
    133         $tableau = preg_split("/\n/", $texte); 
    134         foreach ($tableau as $i=>$valeur) $tableau[$i] = preg_split('//', trim($valeur), -1, PREG_SPLIT_NO_EMPTY);
     133        $tableau = preg_split("/\n/", $texte);
     134        $reg = $GLOBALS['meta']['charset'] == 'utf-8' ? '//u' : '//';
     135        foreach ($tableau as $i=>$valeur) $tableau[$i] = preg_split($reg, trim($valeur), -1, PREG_SPLIT_NO_EMPTY);
    135136        return $tableau;
    136137}
  • _plugins_/jeux/trunk/paquet.xml

    r79919 r79993  
    22        prefix="jeux"
    33        categorie="divers"
    4         version="3.2.2"
     4        version="3.2.3"
    55        etat="test"
    66        compatibilite="[3.0.0;3.0.*]"
Note: See TracChangeset for help on using the changeset viewer.