This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Database collation
#1
Database collation
I never used Zpanel / Sentora for selling hosting to "customers" in way that i would let em use panel. Yes i do have few "clients" but i was/am only one ever accessing panel so i never came to filling account information stuff as i didin't need it etc.
Anyway, today i was testing Sentora and came to filling "account information" for myself. I realized that i can not fill my real name as some of "special" (central European) characters are rejected.
One quick look at database column collation and i can see that collation for "ud_fullname_vc" column is se to "latin1_swedish_ci".
After changing that to "utf8_general_ci" i can fill my name as i should.

I am wondering, is there a reason why it's "latin1_swedish_ci" and not "utf8_general_ci" or it's just a relic of the past that was never on the list for change?

Should i commit some changes to git related to this? Maybe not for all fields, but those that can safely be changed like ones in "x_profiles" tables?
Reply
Thanks given by:
#2
RE: Database collation
Very strange as no one here will let Swedish as default collation, see the installer is using UTF8 by default!

https://github.com/sentora/sentora-core/...l_core.sql

https://github.com/sentora/sentora-core/...l_core.sql

You made me check twice our installer. So unless you find it !

https://github.com/sentora/sentora-core/...&q=swedish

No Swedish collation in our git, only reference is over translation.

What installer you used? May be your host is swedish?
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#3
RE: Database collation
I had tables in swedish collation also, had to dump Db, change to utf8, then re-import.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#4
RE: Database collation
For example, file: https://github.com/sentora/sentora-core/...l_core.sql

Line 40:
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

That is source of all non UTF8's Almost all tables have it. It's basicly overriding general "database" collation.
That should be: CHARSET=utf8

When i change x_profiles table columns to UTF8 and than export x_profles, i get line:

) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

So i'm guessing is that we have to change every table charset. Database charset that is set up on line 13 will have effect only on new tables created after table is created on install.
Reply
Thanks given by:
#5
RE: Database collation
If you want i can commit it while you work with...whatever you work right now. It's not a problem for me and i'd like to help with Sentora with small changes (at least for now until i get more free time).
Reply
Thanks given by:
#6
RE: Database collation
I haven't looked into it completely, but I think it has to be utf8_inicode or similar to allow for foreign characters...
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#7
RE: Database collation
I tested what i wrote up there and it works fine with characters like: čćžšđ (which were not working before). I'm using "utf8_general_ci" for quiet some time now and it never failed me as far as unstandard characters go.
Reply
Thanks given by:
#8
RE: Database collation
(10-13-2014, 10:50 AM)sosojni Wrote: I tested what i wrote up there and it works fine with characters like: čćžšđ (which were not working before). I'm using "utf8_general_ci" for quiet some time now and it never failed me as far as unstandard characters go.

thats great, one of the devs will double check it if you push it to github Wink
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#9
RE: Database collation
Got it.

The issue is over all sentora panel DB's! _core _proftp _roundcube _postfix

5050 motters kandrews
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#10
RE: Database collation
I would highly recommend changing all tables to UTF8 and only using the utf8 safe str functions in php.

We might have to review character encoding in the next release as its not a small job!! It will require lots of core changes if we do it properly.

We are currently making a large publishing app utf8 safe at work, I'll put more info up soon about it Smile
Reply
Thanks given by:


Forum Jump:


Users browsing this thread: 4 Guest(s)