Title: проблема с отображением русских букв
Last modified: 02.09.2009

---

# проблема с отображением русских букв

 *  Решено [klinsy](https://ru.wordpress.org/support/users/klinsy/)
 * (@klinsy)
 * [17 лет, 2 месяца назад](https://ru.wordpress.org/support/topic/%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc%d0%b0-%d1%81-%d0%be%d1%82%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5%d0%bc-%d1%80%d1%83%d1%81%d1%81%d0%ba%d0%b8%d1%85-%d0%b1%d1%83%d0%ba%d0%b2/)
 * При вставке кода html либо php в тело шаблона для вывода сегодняшней даты в русской
   интерпретации — выводятся каракули. Вот код
 *     ```
       <!-- Begin Sidebar -->
       			<div>
       				<ul>
       				<div id="adate">
       <?php
       /*
         these are the russian additional format characters
         д: full textual representation of the day of the week
         Д: full textual representation of the day of the week (first character is uppercase),
         к: short textual representation of the day of the week,
         К: short textual representation of the day of the week (first character is uppercase),
         м: full textual representation of a month
         М: full textual representation of a month (first character is uppercase),
         л: short textual representation of a month
         Л: short textual representation of a month (first character is uppercase),
       */
       function date_ru($formatum, $timestamp=0) {
         if (($timestamp <= -1) || !is_numeric($timestamp)) return '';
         $q['д'] = array(-1 => 'w', 'воскресенье','понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота');
         $q['Д'] = array(-1 => 'w', 'Воскресенье','Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота');
         $q['к'] = array(-1 => 'w', 'вс','пн', 'вт', 'ср', 'чт', 'пт', 'сб');
         $q['К'] = array(-1 => 'w',  'Вс','Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб');
         $q['м'] = array(-1 => 'n', '', 'января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря');
         $q['М'] = array(-1 => 'n', '', 'Января', 'Февраля', 'Март', 'Апреля', 'Май', 'Июня', 'Июля', 'Август', 'Сентября', 'Октября', 'Ноября', 'Декабря');
         $q['л'] = array(-1 => 'n', '', 'янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек');
         $q['Л'] = array(-1 => 'n', '',  'Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек');
   
         if ($timestamp == 0)
           $timestamp = time();
         $temp = '';
         $i = 0;
         while ( (strpos($formatum, 'д', $i) !== FALSE) || (strpos($formatum, 'Д', $i) !== FALSE) ||
                 (strpos($formatum, 'к', $i) !== FALSE) || (strpos($formatum, 'К', $i) !== FALSE) ||
                 (strpos($formatum, 'м', $i) !== FALSE) || (strpos($formatum, 'М', $i) !== FALSE) ||
                 (strpos($formatum, 'л', $i) !== FALSE) || (strpos($formatum, 'Л', $i) !== FALSE)) {
           $ch['д']=strpos($formatum, 'д', $i);
           $ch['Д']=strpos($formatum, 'Д', $i);
           $ch['к']=strpos($formatum, 'к', $i);
           $ch['К']=strpos($formatum, 'К', $i);
           $ch['м']=strpos($formatum, 'м', $i);
           $ch['М']=strpos($formatum, 'М', $i);
           $ch['л']=strpos($formatum, 'л', $i);
           $ch['Л']=strpos($formatum, 'Л', $i);
           foreach ($ch as $k=>$v)
             if ($v === FALSE)
               unset($ch[$k]);
           $a = min($ch);
           $temp .= date(substr($formatum, $i, $a-$i), $timestamp) . $q[$formatum[$a]][date($q[$formatum[$a]][-1], $timestamp)];
           $i = $a+1;
         }
         $temp .= date(substr($formatum, $i), $timestamp);
         return $temp;
       }
   
       echo date_ru('Д, d м Y');
   
       ?> </div>
       <li class="widget"><h2>About <?php bloginfo('name'); ?></h2>
       						<ul>
       							<li class="non">
       								<p>Duis autem vel eum iriure dolor in hendrerit
       								in vulputate velit esse molestie consequat, vel illum dolore eu
       								feugiat. <a href="<?php bloginfo('home'); ?>/about/">More
       								&raquo;</a></p>
       							</li>
       						</ul>
       					</li>
       					<li class="widget"><h2>Categories</h2>
       						<ul id="categories">
       							<?php wp_list_categories('title_li=&show_count=1'); ?>
       						</ul>
       					</li>			
   
       				<?php 	/* Widgetized sidebar, if you have the plugin installed. */
       					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) : ?>
                           <?php endif; ?>
   
       					</ul>
       			</div><!-- End Sidebar -->
       ```
   
 * вот что выводится, и так с любыми вариациями, где есть русский текст.
    [http://pic.ipicture.ru/uploads/090902/168NQzB6Wh.jpg](http://pic.ipicture.ru/uploads/090902/168NQzB6Wh.jpg)
   Подскажите решение, пож…

Просмотр 5 ответов — с 1 по 5 (всего 5)

 *  Модератор [Sergey Biryukov](https://ru.wordpress.org/support/users/sergeybiryukov/)
 * (@sergeybiryukov)
 * Live and Learn
 * [17 лет, 2 месяца назад](https://ru.wordpress.org/support/topic/%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc%d0%b0-%d1%81-%d0%be%d1%82%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5%d0%bc-%d1%80%d1%83%d1%81%d1%81%d0%ba%d0%b8%d1%85-%d0%b1%d1%83%d0%ba%d0%b2/#post-5658)
 * Нужно сохранять файл в кодировке UTF-8 без метки BOM. Например, с помощью редактора
   Notepad++.
 *  Автор [klinsy](https://ru.wordpress.org/support/users/klinsy/)
 * (@klinsy)
 * [17 лет, 2 месяца назад](https://ru.wordpress.org/support/topic/%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc%d0%b0-%d1%81-%d0%be%d1%82%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5%d0%bc-%d1%80%d1%83%d1%81%d1%81%d0%ba%d0%b8%d1%85-%d0%b1%d1%83%d0%ba%d0%b2/#post-5659)
 * dreaweaver 8 разве не подходит?
    Т.е. открыть его и сохранить без BOM ничего 
   не меняя?
 *  Автор [klinsy](https://ru.wordpress.org/support/users/klinsy/)
 * (@klinsy)
 * [17 лет, 2 месяца назад](https://ru.wordpress.org/support/topic/%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc%d0%b0-%d1%81-%d0%be%d1%82%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5%d0%bc-%d1%80%d1%83%d1%81%d1%81%d0%ba%d0%b8%d1%85-%d0%b1%d1%83%d0%ba%d0%b2/#post-5660)
 * спс за своевременность!
 *  Автор [klinsy](https://ru.wordpress.org/support/users/klinsy/)
 * (@klinsy)
 * [17 лет, 2 месяца назад](https://ru.wordpress.org/support/topic/%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc%d0%b0-%d1%81-%d0%be%d1%82%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5%d0%bc-%d1%80%d1%83%d1%81%d1%81%d0%ba%d0%b8%d1%85-%d0%b1%d1%83%d0%ba%d0%b2/#post-5661)
 * преобразовал без бом, не помогло, но изменилось немного
 * [http://pic.ipicture.ru/uploads/090902/2BE68NUotV.jpg](http://pic.ipicture.ru/uploads/090902/2BE68NUotV.jpg)
 *  Автор [klinsy](https://ru.wordpress.org/support/users/klinsy/)
 * (@klinsy)
 * [17 лет, 2 месяца назад](https://ru.wordpress.org/support/topic/%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc%d0%b0-%d1%81-%d0%be%d1%82%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5%d0%bc-%d1%80%d1%83%d1%81%d1%81%d0%ba%d0%b8%d1%85-%d0%b1%d1%83%d0%ba%d0%b2/#post-5662)
 * все нашел решение, всем спасибо

Просмотр 5 ответов — с 1 по 5 (всего 5)

 Тема «проблема с отображением русских букв» закрыта для новых ответов.

## Метки

 * [кодировка](https://ru.wordpress.org/support/topic-tag/%d0%ba%d0%be%d0%b4%d0%b8%d1%80%d0%be%d0%b2%d0%ba%d0%b0/)
 * [шрифт](https://ru.wordpress.org/support/topic-tag/%d1%88%d1%80%d0%b8%d1%84%d1%82/)

 * Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 ответов
 * 2 участника
 * Последний ответ: [klinsy](https://ru.wordpress.org/support/users/klinsy/)
 * Последняя активность: [17 лет, 2 месяца назад](https://ru.wordpress.org/support/topic/%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc%d0%b0-%d1%81-%d0%be%d1%82%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5%d0%bc-%d1%80%d1%83%d1%81%d1%81%d0%ba%d0%b8%d1%85-%d0%b1%d1%83%d0%ba%d0%b2/#post-5662)
 * Статус: решённая

## Темы

### Самые популярные темы

### Темы без ответов

### Без вопроса

### Решённые

### Нерешённые

### Все темы
