|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-02-25 23:07 UTC] nlopess@php.net
[2007-03-05 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 16:00:02 2025 UTC |
Description: ------------ preg_match don't recognize some letters in KOI8-R. Reproduce code: --------------- <? $result = (bool)setlocale(LC_CTYPE, "ru_RU.koi8r", "ru_RU.KOI8-R"); if (!$result || preg_match('/koi8/i', setlocale(LC_CTYPE, 0)) == 0) { die("skip setlocale() failed\n"); } #FRS is First russian letter #LRS is Last russian letter echo preg_match("/^[а-яА-Я]+$/","йцукенгшщзхъфывапролджэячсмитьбю"); #patterrn with [frs-lrsFRS-LRS] and string contained full russian alphabet return 0 echo preg_match("/^[а-яА-Я]+$/","абГДек"); #patterrn with [frs-lrsFRS-LRS] and string some few russian letters (forexample, without third letter in alphabet) return 1 ?> Expected result: ---------------- First and second preg_match must return 1 Actual result: -------------- Only second preg_match must return 1