From 383ec8a8e3a167f332bb97f1c6260fb03ca23eea Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 8 Apr 2019 15:45:26 +0100 Subject: [PATCH] TextFormat: Fixed tokenize() not being Unicode-aware --- src/pocketmine/utils/TextFormat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/utils/TextFormat.php b/src/pocketmine/utils/TextFormat.php index 6e5f817e9..90d1441d8 100644 --- a/src/pocketmine/utils/TextFormat.php +++ b/src/pocketmine/utils/TextFormat.php @@ -74,7 +74,7 @@ abstract class TextFormat{ * @return array */ public static function tokenize(string $string) : array{ - return preg_split("/(" . TextFormat::ESCAPE . "[0-9a-fk-or])/", $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + return preg_split("/(" . TextFormat::ESCAPE . "[0-9a-fk-or])/u", $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); } /**