Browse Source

Fully support unicode

Requires database changes

Adds support for emoji
spaghetti 7 years ago
parent
commit
f69a0d00e2
3 changed files with 151 additions and 151 deletions
  1. 1
    1
      classes/mysql.class.php
  2. 1
    1
      classes/util.php
  3. 149
    149
      gazelle.sql

+ 1
- 1
classes/mysql.class.php View File

201
         $this->halt('Connection failed (host:'.$this->Server.':'.$this->Port.')');
201
         $this->halt('Connection failed (host:'.$this->Server.':'.$this->Port.')');
202
       }
202
       }
203
     }
203
     }
204
-    mysqli_set_charset($this->LinkID, "utf8");
204
+    mysqli_set_charset($this->LinkID, "utf8mb4");
205
   }
205
   }
206
 
206
 
207
   function prepare_query($Query, &...$BindVars) {
207
   function prepare_query($Query, &...$BindVars) {

+ 1
- 1
classes/util.php View File

103
   if ($Str != '' && !is_number($Str)) {
103
   if ($Str != '' && !is_number($Str)) {
104
     $Str = Format::make_utf8($Str);
104
     $Str = Format::make_utf8($Str);
105
     $Str = mb_convert_encoding($Str, 'HTML-ENTITIES', 'UTF-8');
105
     $Str = mb_convert_encoding($Str, 'HTML-ENTITIES', 'UTF-8');
106
-    $Str = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,5};)/m", '&', $Str);
106
+    $Str = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,6};)/m", '&', $Str);
107
 
107
 
108
     $Replace = array(
108
     $Replace = array(
109
       "'",'"',"<",">",
109
       "'",'"',"<",">",

+ 149
- 149
gazelle.sql
File diff suppressed because it is too large
View File


Loading…
Cancel
Save