phpvms / phpvms_v2

Virtual Airline Management (not maintained)
http://www.phpvms.net
BSD 3-Clause "New" or "Revised" License
41 stars 46 forks source link

Change phpVMS Database Collation #106

Open Vansers opened 11 years ago

Vansers commented 11 years ago

Nabeel,

Since phpVMS is used by many different language VA's, whenever you type something like Polish, Spanish, French, Chinese, the different kinds of texts gets messed up.

Example... http://forum.phpvms.net/topic/8898-vstaff-v10/#entry59236

When I did run the query to change my phpVMS Database to utf8, and it did the job not to get any different languages all messed up.

I did some Google searching on the best mySQL Collation and most say it's best to use utf8 or utf8_unicode_ci

Do you think this is important to look into it, or did I miss something to override this in phpVMS Config?

nabeelio commented 11 years ago

That's strange, I remember changing it to utf8 very early on. There are utf8 settings in the config but they don't really do anything in the database side of things

Vansers commented 11 years ago

That's what I see as well.

I did some little digging in as you have set the collation upon database load in the codon.config.php

if(Config::Get('DB_CHARSET_NAME') !== '') {
    DB::query('SET NAMES \''.Config::Get('DB_CHARSET_NAME').'\'');
}

Apparently it doesn't seem to do the work upon form submissions. What do you think or how should we fix this?

nabeelio commented 11 years ago

It should be changed in the install.sql file. I don't think it will hurt to have that as the default. I don't think I did initially, to keep the size down. I do remember recommending to some people to change that to utf8, for internationalization purposes.