1

The code is the following:

setlocale( LC_CTYPE, 'ru_RU' );
echo strtoupper('Hello! Привет!');

Latin characters transforming as expected. But Russian - stays unchanged.

Any thoughts?

Roman Matveev
  • 563
  • 1
  • 6
  • 22
  • You may want to read something about UTF-8: http://allseeing-i.com/How-to-setup-your-PHP-site-to-use-UTF8 http://stackoverflow.com/questions/279170/utf-8-all-the-way-through – ItalyPaleAle Mar 20 '14 at 14:48

1 Answers1

7

You want to use mb_strtoupper() instead:

mb_internal_encoding('UTF-8');
setlocale(LC_CTYPE, 'ru_RU');
echo mb_strtoupper('Hello! Привет!');

Output:

HELLO! ПРИВЕТ!

Demo

Amal Murali
  • 75,622
  • 18
  • 128
  • 150