summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/utf8.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/inc/utf8.php b/inc/utf8.php
index dbf09b6fc..0479d8809 100644
--- a/inc/utf8.php
+++ b/inc/utf8.php
@@ -366,10 +366,12 @@ function utf8_romanize($string){
*/
function utf8_stripspecials($string,$repl='',$additional=''){
global $UTF8_SPECIAL_CHARS;
+ global $UTF8_SPECIAL_CHARS2;
static $specials = null;
if(is_null($specials)){
- $specials = preg_quote(unicode_to_utf8($UTF8_SPECIAL_CHARS), '/');
+# $specials = preg_quote(unicode_to_utf8($UTF8_SPECIAL_CHARS), '/');
+ $specials = preg_quote($UTF8_SPECIAL_CHARS2, '/');
}
return preg_replace('/['.$additional.'\x00-\x19'.$specials.']/u',$repl,$string);
@@ -988,6 +990,26 @@ $UTF8_SPECIAL_CHARS = array(
0xf8fb, 0xf8fc, 0xf8fd, 0xf8fe, 0xfe7c, 0xfe7d,
);
+// utf8 version of above data
+global $UTF8_SPECIAL_CHARS2;
+$UTF8_SPECIAL_CHARS2 =
+ ' !"#$%&\'()+,/;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•�'.
+ '�—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½�'.
+ '�¿×÷ˇ˘˙˚˛˜˝̣̀́̃̉΄΅·βφϑϒϕϖְֱֲֳִֵֶַָֹֻּֽ־ֿ�'.
+ '�ׁׂ׃׳״،؛؟ـًٌٍَُِّْ٪฿‌‍‎‏–—―‗‘’‚“”�'.
+ '��†‡•…‰′″‹›⁄₧₪₫€№℘™Ωℵ←↑→↓↔↕↵'.
+ '⇐⇑⇒⇓⇔∀∂∃∅∆∇∈∉∋∏∑−∕∗∙√∝∞∠∧∨�'.
+ '�∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌐⌠⌡〈〉⑩─�'.
+ '��┌┐└┘├┤┬┴┼═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠'.
+ '╡╢╣╤╥╦╧╨╩╪╫╬▀▄█▌▐░▒▓■▲▼◆◊●�'.
+ '�★☎☛☞♠♣♥♦✁✂✃✄✆✇✈✉✌✍✎✏✐✑✒✓✔✕�'.
+ '��✗✘✙✚✛✜✝✞✟✠✡✢✣✤✥✦✧✩✪✫✬✭✮✯✰✱'.
+ '✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋�'.
+ '�❏❐❑❒❖❘❙❚❛❜❝❞❡❢❣❤❥❦❧❿➉➓➔➘➙➚�'.
+ '��➜➝➞➟➠➡➢➣➤➥➦➧➨➩➪➫➬➭➮➯➱➲➳➴➵➶'.
+ '➷➸➹➺➻➼➽➾�'.
+ '�ﹼﹽ';
+
/**
* Romanization lookup table
*