Avatar

Re: [[:cntrl:]]? (Bugs)

by Urfin® ⌂, Russia, Wednesday, February 03, 2010, 12:46 (5194 days ago) @ Alex

I get "doesn't match!".

I get "doesn't match!" too...
but when the function function contains_special_characters($string) in functions.inc.php contans the string like

if(preg_match("/([[:cntrl:]])/", $string)) return true; // control characters


user with cyrillic name ("Алек©ей" or specially created user "тест") can not publish comments.

and while I check the script

<?php
function matches($string)
 {
  if(preg_match("/([[:cntrl:]])/", $string)) return true; // control characters
  return false;
 }
 
if(matches('тест')) echo 'matches!';
else echo 'doesn\'t match!';
?>


I also get "doesn't match!"

some info about web-server:
Operating system: Linux
Apache version: 2.2.12 (Unix)
PHP version: 5.2.10
MySQL version: 5.0.51a
MySQL encoding: UTF-8 Unicode (utf8)
Unicode collation: utf8_general_ci

...maybe it's better to change last option to utf8_unicode_ci?

--
no bees - no honey,
no business - no money


Complete thread:

 RSS Feed of thread