Table of Contents

Syntax

string convert_cyr_string(string $str string $source, string $target)

(PHP 4, PHP 5)

$str The string value to be converted
$source The Cyrillic character set to be used as a source (single character)
$target The Cyrillic character set to be used as the target (single character).
RETURNS Returns the converted Cyrillic character string.

Cyrillic Character Code (for $source and $target)

  • k = koi8-r
  • w = windows-1251
  • i = iso8859-5
  • a = x-cp866
  • d = x-cp866
  • m = x-mac-cyrillic

What it Does

Performs a binary-safe conversion of a text string from one Cyrillic encoding to another (different) Cyrillic encoding.

Example

echo convert_cyr_string($input, 'w', 'm');
 
convert_cyr_string.txt · Last modified: Apr 18, 2008 - 2:00pm (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki