1. Data in sql file is encoded into latin1, so we leave recoding stuff for mysql. this alllows to use same data for UTF-8 and non UTF-8.

2. Yes - all files containing UTF-8 (!) data MUST be encoded in UTF-8 (like language files). Standard templates and php files do not have any special characters (and this should be the rule for those who writes module) so there is not need to specifically save them into UTF-8.



--------------------------------------------------
From: "Thorsten Albrecht" <[email protected]>
Sent: Wednesday, July 22, 2009 1:18 PM
To: "Arvydas" <[email protected]>
Subject: Re: [oxid-dev-general] Translating OXID UI to other languages

Hi Arvydas,

Yes, you are right, there are some lines which overrides each other, it
should look like:

ALTER SCHEMA CHARACTER SET utf8 COLLATE utf8_general_ci;
SET character_set_database=utf8;
SET character_set_client = latin1;
SET collation_connection = utf8;
SET character_set_results = utf8;

Shouldn't be the character_set_results set to latin1, too? If I talk to
someone (character_set_client) in latin1  then normally I expect to be
answered (character_set_results) in latin1, too. Or am I wrong?

Just to understand those issues completely:
When the live shop is running, then of course _everything_ is using
utf8, isn't it? I.e., every template is coded in UTF8, and
character_set_client is also using utf8. Is this right?

Thank you for an explanation. (Just to explain why I am interested in
understanding those definitions completely: Some weeks I had to mess
around with character sets in Wordpress: UTF8 coded content was
saved in a MySQL4.0 database which did only know about latin1, and I
had to migrate to MySql 5. )

Thorsten




--------------------------------------------------
From: "Thorsten Albrecht" <[email protected]>
Sent: Monday, July 20, 2009 4:02 PM
To: "Arvydas" <[email protected]>
Subject: Re: [oxid-dev-general] Translating OXID UI to other languages

Hi Arvydas,

just a question concerning the following utf8 statements:

2. When you mark UTF-8 checkbox setup does this:

    ALTER SCHEMA CHARACTER SET utf8 COLLATE utf8_general_ci
    set names utf8
    set character_set_database=utf8
    SET CHARACTER SET latin1
    SET CHARACTER_SET_CONNECTION = utf8
    SET character_set_results = utf8
    SET character_set_server = utf8

It seems to me a contradiction to use the following statements with
different character sets:
    set names utf8
    SET CHARACTER SET latin1

See: http://dev.mysql.com/doc/refman/5.1/en/charset-connection.html :

SET CHARACTER SET x means:
         SET character_set_client = x;
         SET character_set_results = x;
         SET collation_connection = @@collation_database;
         (Setting collation_connection also sets
         character_set_connection )

whereas
SET NAMES x means:
      SET character_set_client = x;
      SET character_set_results = x;
      SET character_set_connection = x;


Therefore, shouldn't it be enough to use:
    ALTER SCHEMA CHARACTER SET utf8 COLLATE utf8_general_ci
    set names utf8
?


BTW
    set character_set_database=utf8
should not be necessary after altering the schema?

BTW
SET character_set_server = utf8
should not be necessary after definining the default charset of the
database.
(and it won't  be even possible on an managed server...).

Thorsten


_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general


_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to