string utf8win1251( string text );
The function converts a string from UTF-8 to Windows 1251.
<? echo utf8win1251("битрикс"); // prints the string "bitrix" ?>