UTF8 и проблемы кодировки XAP

UTF8 и проблемы кодировки XAP

проблема Кодировки ссылок ксапы

есть 2 варианта решения:

1. для страниц без кеширования

var $_encoding = »; // выбор кодировки вашего сайта. Пусто — win-1251 (по умолчанию). Также возможны: KOI8-U, UTF-8 (необходим модуль iconv на хостинге)

2. С кешированием :

Заменяем:

<code style="white-space: nowrap;"><code><span style="color: #000000;"><span style="color: #007700;">echo </span><span style="color: #0000bb;">$tnx</span><span style="color: #007700;">-></span><span style="color: #0000bb;">show_link</span><span style="color: #007700;">(</span><span style="color: #0000bb;">1</span><span style="color: #007700;">);
echo </span><span style="color: #0000bb;">$tnx</span><span style="color: #007700;">-></span><span style="color: #0000bb;">show_link</span><span style="color: #007700;">(</span><span style="color: #0000bb;">1</span><span style="color: #007700;">);
echo </span><span style="color: #0000bb;">$tnx</span><span style="color: #007700;">-></span><span style="color: #0000bb;">show_link</span><span style="color: #007700;">(</span><span style="color: #0000bb;">1</span><span style="color: #007700;">);
echo </span><span style="color: #0000bb;">$tnx</span><span style="color: #007700;">-></span><span style="color: #0000bb;">show_link</span><span style="color: #007700;">(); </span></span>

на:

PHP Code:

<!-- php buffer start --><code><span style="color: #000000;"> <span style="color: #007700;">echo </span><span style="color: #0000bb;">iconv</span><span style="color: #007700;">(</span><span style="color: #dd0000;">'cp1251'</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'<span class="highlight">utf8</span>'</span><span style="color: #007700;">,</span><span style="color: #0000bb;">$tnx</span><span style="color: #007700;">-></span><span style="color: #0000bb;">show_link</span><span style="color: #007700;">(</span><span style="color: #0000bb;">1</span><span style="color: #007700;">));
echo </span><span style="color: #0000bb;">iconv</span><span style="color: #007700;">(</span><span style="color: #dd0000;">'cp1251'</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'<span class="highlight">utf8</span>'</span><span style="color: #007700;">,</span><span style="color: #0000bb;">$tnx</span><span style="color: #007700;">-></span><span style="color: #0000bb;">show_link</span><span style="color: #007700;">(</span><span style="color: #0000bb;">1</span><span style="color: #007700;">));
echo </span><span style="color: #0000bb;">iconv</span><span style="color: #007700;">(</span><span style="color: #dd0000;">'cp1251'</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'<span class="highlight">utf8</span>'</span><span style="color: #007700;">,</span><span style="color: #0000bb;">$tnx</span><span style="color: #007700;">-></span><span style="color: #0000bb;">show_link</span><span style="color: #007700;">(</span><span style="color: #0000bb;">1</span><span style="color: #007700;">));
echo </span><span style="color: #0000bb;">iconv</span><span style="color: #007700;">(</span><span style="color: #dd0000;">'cp1251'</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'<span class="highlight">utf8</span>'</span><span style="color: #007700;">,</span><span style="color: #0000bb;">$tnx</span><span style="color: #007700;">-></span><span style="color: #0000bb;">show_link</span><span style="color: #007700;">()); </span></span>

PHP Code:

Добавить комментарий