8 users online. Create an account or sign in to join them.Users

Search

Isn’t mbstring included in most PHP installations?

Yes, but it isn’t enabled by default. That’s the problem. Either way, I think option 1 is a reasonable way to go. And an “Optional Step” in the installation instructions, for enabling mutli-byte character support, would suffice.

I’ve successfully integrated the various MB string functions into Symphony previously. Do lots of search and replacing then add the line below to your /symphony/lib/boot/bundle.php and it will work fine :)

mb_internal_encoding("UTF-8"); // Changed internal string functions to MB functions and setting to utf-8.

The other language-related issue I have discovered and solved involves the database type. Many of the tables symphony creates do not specify an encoding type and despite the encoding being set to utf-8 in the /manifest/config.php file, when creating tables, mysql will assume the default encoding of the database.

When most people set up a database for their symphony install it will be set to latin or something.

The solution is to change your setCharacterSet() function in /symphony/lib/toolkit/class.mysql.php to the following: -

        public function setCharacterSet($set='utf8'){
        $this->query("SET character_set_connection = '$set', character_set_database = '$set', character_set_server = '$set'");
        $this->query("SET CHARACTER SET '$set'");
    }

This means new tables will now default to the setting in your manifest/config.php file which should be utf-8. However most of your existing tables will be set to latin which you’ll need to convert.

You can do this with the following mysql command:, issue it on each table in your symphony install: -

ALTER TABLE ***table_name*** CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

This should get your symphony install purring with foreign languages. Enjoy.

Regards, Richard

Another tip I would recommend is when creating databases for symphony you use the following mysql: -

CREATE DATABASE ***database_name*** CHARACTER SET utf8 COLLATE utf8_unicode_ci;

But my problem with seo urls not solved. Database encoding in utf8 ( i use both variants - utf8 general and utf8 unicode). Let’s wait solution…….

Problem is solved. But I have found out other problem with seo-urls. I add new article with Cyrilic name (example see http://fantabulous.ru/ last articles) <title handle="">Статья11 (123)ваафу?*(*?(*:%:%:%(*)__)+__)</title>

Interestingly, I get a handle of Статья11-123ваафу which is correct.

Either way, I am going to try changing the createHandle() function to properly support the mb_string functions.

Can we have Symphony create unicode tables by default?

And also a notice saying “your database isn’t unicode, you might want to change it” on installation would be handy.

Can we have Symphony create unicode tables by default?

I believe, and Alistair will have to verify, that this isn’t done because some hosts don’t like it when you specify encoding for tables. That’s why we tried in the installation tutorial to get users to create their DBs with UTF-8 encoding.

Uhm, the install.sql actually does say

ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Maybe MySQL changes the CHARSET and COLLATION to the one the database is using? If this is the case install.php could display a warning that the currently selected database isn’t set to utf8.

Maybe MySQL changes the CHARSET and COLLATION to the one the database is using?

Yeah, I’m pretty sure that’s how it works.

Guys, i have all tables and collations in utf-8. Also utf-8 in config.php in db section. Everything works as expected in Firefox, but in IE the page just isn't loading at all. Try this

http://tongkat24.ru/getapteka/getaptekasbymetro/%D0%AE%D0%B3%D0%BE-%D0%97%D0%B0%D0%BF%D0%B0%D0%B4%D0%BD%D0%B0%D1%8F/

What's wrong? In symphony log just lines:

Line: 135 - loadXML(): Input is not proper UTF-8, indicate encoding !
Bytes: 0xD4 0xF0 0xF3 0xED in Entity, line: 17 in file /home/mysite.ru/symphony/lib/toolkit/class.frontendpage.php on line 272

I've exported all the data from MySQL. Everything is in utf-8 as expected. BTW, line 17 in error points to url param (which is in cyrillic). Maybe that's causing the error?

Oops. I've found the problem. Seems like Firefox automatically encodes the request, whilst IE - not.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details