encoding - Proper MySQL character set/collation variables in my.cnf? -


I'm trying to completely change my site in UTF-8, so I do not have to deal with utf8_encode Is () & Amp; Utf8_decode () functions.

I have a matching set of my tables properly, and I'm temporarily using query SET NAMES utf8 to override my file.

My question is - in my CNF there is a ton of character sets and collation variables, and I suspect something should be left alone ... which would change me to get the effect of Should I SET NAMES utf8 ?

(My tables are matching utf8_unicode_ci .)

  character_set_client | Latin 1 Character_set_connection | Latin 1 Character_set_database Latin 1 Character_set_file system | Binary | Character_sat_resests | Latin 1 Character_set_services | Latin 1 Character_set_system | UTF8 | Collation_connection | Latin 1_swedish_c | Collation_database | Latin 1_swedish_c | Collation_server | Latin 1_swedish_c |  

Well, mainly for classification, so long as you do a lnaguage Do not archive specific sorting requirements, utf8_unicode_ci should be OK.

Internally using the character_set _ * value for all other string actions - such as value check in WHERE sections or if / case statement, CHAR_LENGTH (), replay (), SUBSTRING () - String functions like stuff like.

Generally, they should be all (except in this case, utf8 ) - I recommend keeping it in binary until you There is no specific requirement to go away from him.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -