<< Back to previous view

[QB-845] non-English characters are converted to "?" when restoring database from backup
Created: 03/Mar/11  Updated: 03/Mar/11

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: 3.1.22
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Alexey Shumkin Assigned To: Robin Shen
Resolution: Won't Fix Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown
Environment: Operating System Linux 2.6.35.11-83.fc14.i686, i386
JVM OpenJDK Client VM 19.0-b09, Sun Microsystems Inc.
QuickBuild Version 3.1.22 - Tue Mar 01 08:35:19 MSK 2011


 Description   
I had QB-server on Windows + MS SQL Server (as DB backend).
Configurations descriptions, usernames, groups, steps descriptions and variables contained non-Englished characters (Russian).
Then I decided to migrate to Linux platform + MySql

I created MySql db with "utf8_general_ci" encoding.
I took last backup (let name it backup.zip) created with Windows QB version (v3.1.11) and restored it on Linux with "restore.sh backup.zip" command.
After starting a server every non-English letter in Config descriptions, usernames and groups was converted to ?, except steps and variables (I guess because they are stored as blobs )). The same picture is in DB itself (have seen with phpmyadmin).

As I see "backup.zip/Configurations.xml" (and etc) file is stored as UTF-8 (without BOM) and non-English characters are stored correctly.

For the experiment before restoring I tried to:
  1. set explicitly LANG and LC_ALL to "ru_RU.UTF-8" - not helped
  2. change database collation to "cp1251_general_ci" - not helped
  3. change database collation to "cp1251_general_ci" and set LANG and LC_ALL to "russian" - not helped



 Comments   
Comment by Alexey Shumkin [ 03/Mar/11 09:46 AM ]
The problem is larger then I though at first time.
Every time I save non-English configuration, username or group descriptions non-English characters are converted to ?????? and saved to DB. Then they are messed up again after restarting a server.
Comment by Robin Shen [ 03/Mar/11 10:47 AM ]
While keeping database collate as UTF8, please modify file "<QB server>/conf/hibernate.properties" to use below mysql url:

hibernate.connection.url=jdbc:mysql://dbhost:3306/quickbuild?characterEncoding=UTF-8
Comment by Alexey Shumkin [ 03/Mar/11 12:14 PM ]
thanks , it worked
Does this have to be documented?
Comment by Robin Shen [ 03/Mar/11 12:32 PM ]
Yes, we ought to have this mentioned in the wiki.
Generated at Sun May 19 02:17:09 UTC 2024 using JIRA 189.