History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-845
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Robin Shen
Reporter: Alexey Shumkin
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

non-English characters are converted to "?" when restoring database from backup

Created: 03/Mar/11 09:09 AM   Updated: 03/Mar/11 12:32 PM
Component/s: None
Affects Version/s: 3.1.22
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: 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  « Hide
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



 All   Comments   Work Log   Change History      Sort Order:
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.

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

Alexey Shumkin [03/Mar/11 12:14 PM]
thanks , it worked
Does this have to be documented?

Robin Shen [03/Mar/11 12:32 PM]
Yes, we ought to have this mentioned in the wiki.