Skip to content

Make OpenX properly display UTF-8 characters

19 Aug 2009

Make OpenX properly display UTF-8 characters

Upon installing OpenX, I realized that it does not display properly some UTF-8 charactes, such as Russian ‘И’ and ‘ш’.

The solution (got it here) is to place SET NAMES ‘utf8’ in two places.

file: openx/lib/OA/DB.php
search: $oDbh->setFetchMode(MDB2_FETCHMODE_ASSOC);
add after: $oDbh->query(“SET NAMES utf8”);

file: openx/lib/OA/Dal/Delivery/mysql.php
search: if (@mysql_select_db($dbName, $dbLink)) {
add before: @mysql_query(“SET NAMES utf8”);

About

    Hello, my name is Yuri and I specialize in creating custom add-ons (plugins, modules, extensions) for ExpressionEngine CMS.
    You can reach me anytime by emailing .(JavaScript must be enabled to view this email address)