Defect #1317

Mantis migration - encoding mismatches

Added by Leszek Ciesielski over 14 years ago. Updated over 14 years ago.

Status:NewStart date:2008-05-28
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:


I am using the svn-head version of Redmine. When I try to migrate an existing Mantis setup (databases use LATIN2 encoding AFAIK), I can either:
- migrate with encoding[UTF-8] (I just leave the default) - this botches the user names and ticket texts quite a lot
- try to change the encoding used by rake - this breaks with

encoding [UTF-8]: LATIN2

rake aborted!
Validation failed: Lastname activerecord_error_invalid

Any ideas what encoding could work (I tried several, everything other than UTF-8 gives the same error)? And BTW, could the script just autodetect it, like phpmyadmin does?

The original database export is 40MB after compression, but if someone is willing to work on this I can trim it down and attach a smaller repro. (6.66 KB) Leszek Ciesielski, 2008-06-02 16:11


#1 Updated by Jean-Philippe Lang over 14 years ago

Your user names may contain unexpected characters. See source:/trunk/app/models/user.rb@1443#L57

#2 Updated by Leszek Ciesielski over 14 years ago

'username' contains ASCII, 'realname' contains polish letters. When I try to import with ASCII in 'realname' it succeedes, but I get garbled text in ticket messages, which probably means I used a wrong encoding :-(

Attached is an sql dump of the user table.

Also available in: Atom PDF