Defect #5408
closedMercurial and chinese code
Added by xiaoyu yin over 14 years ago. Updated almost 14 years ago.
0%
Description
当HG库的路径中有中文目录,或者文件有中文名称时,中文显示为乱码,如图.
When the way to repository include some chinese code, there's some problem with it to show the way or the name of files.
!!
Files
Related issues
Updated by Jean-Philippe Lang over 14 years ago
- Subject changed from 当HG库的路径中有中文目录,或者文件有中文名称时,中文显示为乱码,如图.When there is chinese to Mercurial and chinese code
Please post in english and include patches rather than source files so we can see what you changed.
Updated by xiaoyu yin over 14 years ago
Thank you fist! I have tried the Settings -> Repository setting to set the code of repository, but it doesn't solve the problem.
I have tried the #2664 patch and it doesn't solve the problem too.
My configure:
BitNami Redmine Stack
(
- Redmine 0.9.3
- Apache 2.2.14
- ImageMagick 6.5.6-8-Q8
- MySQL 5.0.83
- Subversion 1.6.6
- Ruby 1.8.7
- Rails 2.3.5
- RubyGems 1.3.5
)
tortoisehg-1.0.1-hg-1.5.1-x86(= mercurial 1.5.1)
system: Windows Xp professional 2002 SP3
Updated by Toshi MARUYAMA over 14 years ago
- File redmine-windows-japanese-sjis.png redmine-windows-japanese-sjis.png added
- File redmine-windows-japanese-sjis-setting.png redmine-windows-japanese-sjis-setting.png added
- File tortoisehg-windows-japanese-sjis.png added
- File explorer-windows-japanese-sjis.png explorer-windows-japanese-sjis.png added
Thank you for your feedback.
I have tried on Japanese Windows Vista and SQLite.
I can see Japanese named file.
You need to delete repository created before patch applied and recreate the same repository from Redmine settings tab.
Updated by Toshi MARUYAMA over 14 years ago
Please delete "tortoisehg-windows-japanese-sjis.png" because this image contains mail address.
Now I post a new image "tortoisehg-windows-japanese-sjis-1.png".
Updated by Felix Schäfer over 14 years ago
- File deleted (
tortoisehg-windows-japanese-sjis.png)
Updated by xiaoyu yin over 14 years ago
- File problem_cut_01.bmp problem_cut_01.bmp added
- File problem_cut_02.bmp problem_cut_02.bmp added
Dose the issue-2664-0.9-stable-2010-04-11.patch will add an 'repository path encoding Options' in the repository tab settings of redmine ? or I need to set the 'repository encoding Options' in the repository tab settings of redmine to UTF-8 ?
I Modified my source file as the issue-2664-0.9-stable-2010-04-11.patch told, but there's nothing changed.
And I have tried to delete repository and recreate by redmine, but there's nothing changed.
By the way , my hg's language setting is English for redmine doesn't Identification chinese hg. When I changed hg to English language, the redmine works.
You can see from picture that the commit message and author in chinese are all correct except the chinese path.
Updated by Toshi MARUYAMA over 14 years ago
You need to run "patch" command with -p1 option on redmine directory and run "rake db:migrate" .
$ hg clone -U http://bitbucket.org/svn/redmine $ cd redmine $ hg update -r 0.9-stable $ wget http://www.redmine.org/attachments/download/3544/issue-2664-0.9-stable-2010-04-11.patch $ patch -p1 < issue-2664-0.9-stable-2010-04-11.patch patching file lib/redmine/scm/adapters/mercurial/hg-template-0.9.5.tmpl patching file lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl patching file lib/redmine/scm/adapters/mercurial_adapter.rb patching file app/helpers/repositories_helper.rb patching file app/models/repository.rb patching file db/migrate/20100410053957_add_repositories_path_encoding.rb patching file lib/redmine/scm/adapters/path_encodable_wrapper.rb $ hg status M app/helpers/repositories_helper.rb M app/models/repository.rb M lib/redmine/scm/adapters/mercurial/hg-template-0.9.5.tmpl M lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl M lib/redmine/scm/adapters/mercurial_adapter.rb ? db/migrate/20100410053957_add_repositories_path_encoding.rb ? issue-2664-0.9-stable-2010-04-11.patch ? lib/redmine/scm/adapters/path_encodable_wrapper.rb $ rake db:migrate RAILS_ENV=XXXX
Updated by Toshi MARUYAMA over 14 years ago
You can use "hg import" instead of "patch" command.
$ hg pare changeset: 3718:50156ae18af6 branch: 0.9-stable tag: tip parent: 3713:661ffe81dfdd user: jplang@e93f8b46-1217-0410-a6f0-8f06a7374b81 date: Mon May 03 16:21:37 2010 +0000 summary: tagged version 0.9.4 $ hg import issue-2664-0.9-stable-2010-04-11.patch applying issue-2664-0.9-stable-2010-04-11.patch applied fb5f1869fb60 $ hg glog -l3 @ changeset: 3720:4d0e8db09b44 | branch: 0.9-stable | tag: tip | user: Yuya Nishihara <XXXXXXXXXXXXXXX> | date: Sun Apr 11 11:17:38 2010 +0900 | summary: repository: add filename encoding conversion | o changeset: 3719:fb5f1869fb60 | branch: 0.9-stable | user: Yuya Nishihara <XXXXXXXXXXXXXXX> | date: Sun Apr 11 11:17:43 2010 +0900 | summary: mercurial: escape any filenames by urlescape | o changeset: 3718:50156ae18af6 | branch: 0.9-stable | parent: 3713:661ffe81dfdd | user: jplang@e93f8b46-1217-0410-a6f0-8f06a7374b81 | date: Mon May 03 16:21:37 2010 +0000 | summary: tagged version 0.9.4 |
Updated by Toshi MARUYAMA over 14 years ago
xiaoyu yin wrote:
I can't run the 'rake' command .
$ gem install rake
Updated by xiaoyu yin over 14 years ago
- Status changed from New to Resolved
Thank you! But I can't run the command too.
Updated by Toshi MARUYAMA over 14 years ago
I don't know what BitNami is.
"hg clone" is an example of source install.
You need rename config/database.yml.example to config/database.yml.
$ rake db:migrate RAILS_ENV=test_sqlite3 (in R:/REDMINE/bitbucket-redmine-qclone/redmine-mq) Loaded suite r:/Ruby/bin/rake Started Finished in 0.001 seconds. 0 tests, 0 assertions, 0 failures, 0 errors
$ rake db:migrate RAILS_ENV=XXXX (in R:/REDMINE/bitbucket-redmine-qclone/redmine-mq) rake aborted! No such file or directory - R:/REDMINE/bitbucket-redmine-qclone/redmine-mq/config/environments/XXXX.rb (See full trace by running task with --trace)
Updated by xiaoyu yin over 14 years ago
- File database.yml database.yml added
Thank you very much .
Here is the explain of BitNami:http://bitnami.org/learn_more
my database.yml exits.
Updated by Toshi MARUYAMA over 14 years ago
Set PATH to your ruby.exe installed path.
set PATH=%PATH%;R:\Ruby\bin
You can use control panel too.
R:\Ruby\bin>dir 2010/03/23 12:24 <DIR> . 2010/03/23 12:24 <DIR> .. 2010/02/10 12:34 419 convert_to_should_syntax 2010/02/10 12:34 170 convert_to_should_syntax.bat 2009/11/10 04:00 48,640 dbm3.dll 2009/11/10 04:00 3,880 erb 2009/11/10 04:00 177 erb.bat 2009/11/10 04:00 62,464 gdbm3.dll 2009/11/10 04:01 571 gem 2009/11/10 04:01 177 gem.bat 2009/11/10 04:00 377 irb 2009/11/10 04:00 177 irb.bat 2009/11/10 04:00 1,568,177 libeay32-0.9.8-msvcrt.dll 2009/11/10 04:00 978,432 libiconv2.dll 2009/11/10 03:56 839,680 msvcrt-ruby18.dll 2009/11/10 04:00 114,688 pdcurses.dll 2010/01/18 21:56 392 rackup 2010/01/18 21:56 152 rackup.bat 2010/03/23 12:24 394 rails 2010/03/23 12:24 151 rails.bat 2010/01/18 21:56 390 rake 2010/01/18 21:56 150 rake.bat 2009/11/10 04:00 1,541 rdoc 2009/11/10 04:00 177 rdoc.bat 2009/11/10 04:00 1,489 ri 2009/11/10 04:00 177 ri.bat 2009/11/10 04:00 422,583 ruby.exe 2009/11/10 04:00 422,583 rubyw.exe 2009/09/12 09:53 312 setrbvars.bat 2009/11/10 04:00 329,215 ssleay32-0.9.8-msvcrt.dll 2009/11/10 04:00 151 testrb 2009/11/10 04:00 177 testrb.bat 2009/11/10 04:00 59,904 zlib1.dll
Updated by xiaoyu yin over 14 years ago
Maybe I can use the Bitnami's control panel?
like the annex
Updated by Toshi MARUYAMA over 14 years ago
PATH is environment variable.
http://en.wikipedia.org/wiki/Environment_variable
Updated by xiaoyu yin over 14 years ago
- File 环境变量-中文.bmp 环境变量-中文.bmp added
I've already set this to chinese by adding a system Environment_variable LANGUAGE zh_CN.
and I can't use the rake command in ruby/bin directory too.
Updated by Toshi MARUYAMA over 14 years ago
c:\>set PATH Path=r:\Ruby\bin;C:\Program Files\TortoiseHg;C:\strawberry\c\bin;C:\strawberry\perl\bin;R:\PostgreSQL\8.4\bin;R:\PostgreSQL\8.4\lib;R:\PHP\;...
Updated by Toshi MARUYAMA over 14 years ago
Updated by xiaoyu yin over 14 years ago
- File migrate_result.txt migrate_result.txt added
Sorry for so long time to test it.
I have run migrate command successfully, but the option doesn't been added.
I test it for several times, only once I can see the adition option but even this, there still shows error on chinese codes.
Updated by Toshi MARUYAMA over 14 years ago
I recommend you to manage redmine source with git or Mercurial.
Git repositry.
http://github.com/edavis10/redmine
Mercurial repository.
http://bitbucket.org/svn/redmine
Yuya's (patch author) MQ repository.
http://bitbucket.org/yuja/redmine-mq/src
http://bitbucket.org/yuja/redmine-mq-issue4455
Updated by Toshi MARUYAMA over 14 years ago
Updated by xiaoyu yin over 14 years ago
Oh, it's luckly today. I had to uninstall the redmine and reinstall it. Then creat hg repository in redmine folder.
And then import the patch. And then restart the redmine service. It works!! The path_encoding column was added successfully.
I repeat the steps above, it works too.
So, there's no error code now.
Thank you Toshi Maruyama! The problem solved.
Updated by Toshi MARUYAMA over 14 years ago
Please set this issue related to #2664.
Updated by xiaoyu yin over 14 years ago
Ok. Also, I run the "rake db:migrate RAILS_ENV=production" command. It's necessary.
Updated by Toshi MARUYAMA over 14 years ago
Updated by Toshi MARUYAMA over 14 years ago
xiaoyu yin wrote:
How can I do it?
You and I don't have a right to set issue relation on this Redmine.
For example, this issue is related to #5407 .
Updated by Eric Davis about 14 years ago
- Priority changed from Urgent to Normal
I can't tell if this issue is resolved or not. Any else know what's going on here?
Updated by Toshi MARUYAMA about 14 years ago
Eric Davis wrote:
I can't tell if this issue is resolved or not. Any else know what's going on here?
This is duplicate with #2664.
Updated by Toshi MARUYAMA about 14 years ago
And this issue is related with #5251.
Updated by Toshi MARUYAMA almost 14 years ago
- Status changed from Resolved to Closed
- Resolution changed from Fixed to Duplicate