Browse Source

Fully support unicode

Requires database changes

Adds support for emoji
spaghetti 1 year 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,7 +201,7 @@ class DB_MYSQL {
201 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 207
   function prepare_query($Query, &...$BindVars) {

+ 1
- 1
classes/util.php View File

@@ -103,7 +103,7 @@ function display_str($Str) {
103 103
   if ($Str != '' && !is_number($Str)) {
104 104
     $Str = Format::make_utf8($Str);
105 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 108
     $Replace = array(
109 109
       "'",'"',"<",">",

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


Loading…
Cancel
Save