View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0010056 | mantisbt | upgrade | public | 2009-01-16 08:15 | 2009-06-23 15:28 |
| Reporter | Kirill | Assigned To | jreese | ||
| Priority | normal | Severity | major | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | ||
| Platform | Windows | OS | Windows XP | OS Version | 1.1.0 |
| Product Version | 1.2.0a3 | ||||
| Target Version | 1.2.0rc1 | Fixed in Version | 1.2.0rc1 | ||
| Summary | 0010056: Category national character | ||||
| Description | After upgrade I see wrong category name. | ||||
| Tags | No tags attached. | ||||
| Attached Files | 0001-Fix-10056-Send-the-UTF8-command-to-MySQL-databases.patch (1,012 bytes)
From d51d0136661c484d551d94e83bdea8637a55e94c Mon Sep 17 00:00:00 2001
From: John Reese <jreese@leetcode.net>
Date: Fri, 30 Jan 2009 10:11:33 -0500
Subject: [PATCH] Fix #10056: Send the UTF8 command to MySQL databases during the installation/upgrade process.
---
admin/install.php | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/admin/install.php b/admin/install.php
index 292d1c1..5bf409a 100644
--- a/admin/install.php
+++ b/admin/install.php
@@ -693,6 +693,13 @@ if( 3 == $t_install_state ) {
echo '<tr><td bgcolor="#ffffff" col_span="2"> Database Creation Suppressed, SQL Queries follow <pre>';
}
+ # Make sure we do the upgrades using UTF-8 if needed
+ if ( $f_db_type === 'mysql' || $f_db_type === 'mysqli' ) {
+ if( strtolower( lang_get( 'charset' ) ) === 'utf-8' ) {
+ $g_db->execute( 'SET NAMES UTF8' );
+ }
+ }
+
if( $f_db_type == 'db2' ) {
$result = &$g_db->execute( 'set schema ' . $f_db_schema );
if( $result === false ) {
--
1.6.1.2
| ||||
|
Reminder sent to: grangeway Paul, can you take a look at this? I assume that something in the install/upgrade process needs to set appropriate database encodings based on the configured language? |
|
|
I try research and found, that in $t_category_result in function function install_category_migrate() { |
|
|
Any patch exists? I can test... |
|
|
what version did you upgrade from? |
|
|
additionally, does your server include the mbstring extension? |
|
|
At now I use 1.1.6. UTF-8. DB utf8_general_ci.
|
|
|
create a info.php file in your server with the single line: <?php phpinfo(); point your browser to the page and search in the output the "mbstring" section. if it's not there, you should add it to your installation and retry the upgrade |
|
|
mbstring mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1. Directive Local Value Master Value |
|
|
Then it seems something else is failing... |
|
|
giallu, If you can connect with me jid: krak@jabber.ru. I can test all you version of any ideas. |
|
|
ok. let's check the collation: in the phpmyadmin pages, check both the table's one (it's a new table in 1.2 IIRC) and of the "name" field. Of course, the collation should be utf8_general_ci |
|
|
All tables utf8_general_ci. |
|
|
What I can test too? |
|
|
I will need to test this stuff locally. BTW, which MySQL version are you using? |
|
|
Note the problem I think is causing this: in core/database_api.php, the db_connect() call sends a special query to MySQL databases ('SET NAMES UTF8'), but the admin/install.php scripts do not call this function, and therefor do not send that query/command after connecting. Or am I missing something? |
|
|
heck, it could be... |
|
|
Sorry, I see your answer at now... MySQL
jreese may be proove. giallu, when you made change - I can test it. |
|
|
Can you please try applying the attached patch to your copy, and re-run the upgrade process on your 1.1.x database, and see if this fixes the problem? Thank you. |
|
|
Yes. It's work. |
|
|
Fix committed to 1.2.x development tree. |
|