note 57886 added to function.convert-cyr-string

From: Date: Tue, 18 Oct 2005 09:20:11 +0000
Subject: note 57886 added to function.convert-cyr-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-97153@lists.php.net to get a copy of this message
// Modificated by tapin13 // Convert win-1251 to utf-8 function unicode_russian($str) { $encode = ""; // 1025 = "&#1025;"; // 1105 = "&#1105;"; for ($ii=0;$ii<strlen($str);$ii++) { $xchr=substr($str,$ii,1); if (ord($xchr)>191) { $xchr=ord($xchr)+848; $xchr="&#" . $xchr . ";"; } if(ord($xchr) == 168) { $xchr = "&#1025"; } if(ord($xchr) == 184) { $xchr = "&#1105"; } $encode=$encode . $xchr; } return $encode; } ---- Manual Page -- http://www.php.net/manual/en/function.convert-cyr-string.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57886 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57886&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57886&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57886&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57886&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57886&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57886&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57886&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57886&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#97153) next »