https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-04-30T09:35:03ZRedmineRedmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=162792010-04-30T09:35:03ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Subject</strong> changed from <i>当HG库的路径中有中文目录,或者文件有中文名称时,中文显示为乱码,如图.When there is chinese </i> to <i>Mercurial and chinese code</i></li></ul><p>Please post in english and include patches rather than source files so we can see what you changed.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=162822010-04-30T09:38:14ZToshi MARUYAMA
<ul></ul><p>Try <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Mercurial: Repository path encoding of non UTF-8 characters (Closed)" href="https://www.redmine.org/issues/2664">#2664</a> patch.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=164012010-05-04T07:01:24Zxiaoyu yin
<ul></ul><p>Thank you fist! I have tried the Settings -> Repository setting to set the code of repository, but it doesn't solve the problem.</p>
<p>I have tried the <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Mercurial: Repository path encoding of non UTF-8 characters (Closed)" href="https://www.redmine.org/issues/2664">#2664</a> patch and it doesn't solve the problem too.</p>
<p>My configure:<br />BitNami Redmine Stack<br />(<br /> - Redmine 0.9.3 <br /> - Apache 2.2.14 <br /> - ImageMagick 6.5.6-8-Q8 <br /> - MySQL 5.0.83 <br /> - Subversion 1.6.6 <br /> - Ruby 1.8.7 <br /> - Rails 2.3.5 <br /> - RubyGems 1.3.5<br />)<br />tortoisehg-1.0.1-hg-1.5.1-x86(= mercurial 1.5.1)</p>
<p>system: Windows Xp professional 2002 SP3</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=164162010-05-04T19:21:34ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/3680">redmine-windows-japanese-sjis.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3680/redmine-windows-japanese-sjis.png">redmine-windows-japanese-sjis.png</a> added</li><li><strong>File</strong> <a href="/attachments/3681">redmine-windows-japanese-sjis-setting.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3681/redmine-windows-japanese-sjis-setting.png">redmine-windows-japanese-sjis-setting.png</a> added</li><li><strong>File</strong> <i>tortoisehg-windows-japanese-sjis.png</i> added</li><li><strong>File</strong> <a href="/attachments/3683">explorer-windows-japanese-sjis.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3683/explorer-windows-japanese-sjis.png">explorer-windows-japanese-sjis.png</a> added</li></ul><p>Thank you for your feedback.<br />I have tried on Japanese Windows Vista and SQLite.<br />I can see Japanese named file.<br />You need to delete repository created before patch applied and recreate the same repository from Redmine settings tab.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=164182010-05-04T19:42:07ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/3684">tortoisehg-windows-japanese-sjis-1.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3684/tortoisehg-windows-japanese-sjis-1.png">tortoisehg-windows-japanese-sjis-1.png</a> added</li></ul><p>Please delete "tortoisehg-windows-japanese-sjis.png" because this image contains mail address.<br />Now I post a new image "tortoisehg-windows-japanese-sjis-1.png".</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=164242010-05-04T20:29:20ZFelix Schäfer
<ul><li><strong>File</strong> deleted (<del><i>tortoisehg-windows-japanese-sjis.png</i></del>)</li></ul> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=164352010-05-05T07:33:25Zxiaoyu yin
<ul><li><strong>File</strong> <a href="/attachments/3687">problem_cut_01.bmp</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3687/problem_cut_01.bmp">problem_cut_01.bmp</a> added</li><li><strong>File</strong> <a href="/attachments/3688">problem_cut_02.bmp</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3688/problem_cut_02.bmp">problem_cut_02.bmp</a> added</li></ul><p>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 ?</p>
<p>I Modified my source file as the issue-2664-0.9-stable-2010-04-11.patch told, but there's nothing changed.</p>
<p>And I have tried to delete repository and recreate by redmine, but there's nothing changed.</p>
<p>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.</p>
<p>You can see from picture that the commit message and author in chinese are all correct except the chinese path.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=164532010-05-05T10:50:02ZToshi MARUYAMA
<ul></ul><p>You need to run "patch" command with -p1 option on redmine directory and run "rake db:migrate" .</p>
<pre>
$ 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
</pre> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=164582010-05-05T11:05:26ZToshi MARUYAMA
<ul></ul><p>You can use "hg import" instead of "patch" command.</p>
<pre>
$ 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
|
</pre> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=164942010-05-06T02:46:04Zxiaoyu yin
<ul></ul><p>I can't run the 'rake' command .</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=164962010-05-06T04:08:22ZToshi MARUYAMA
<ul></ul><p>xiaoyu yin wrote:</p>
<blockquote>
<p>I can't run the 'rake' command .</p>
</blockquote>
<pre>
$ gem install rake
</pre> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=166052010-05-10T01:43:30Zxiaoyu yin
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul><p>Thank you! But I can't run the command too.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=166072010-05-10T05:24:37ZToshi MARUYAMA
<ul></ul><p>I don't know what BitNami is.<br />"hg clone" is an example of source install.<br />You need rename config/database.yml.example to config/database.yml.</p>
<pre>
$ 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
</pre>
<pre>
$ 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)
</pre> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=166082010-05-10T05:43:30Zxiaoyu yin
<ul><li><strong>File</strong> <a href="/attachments/3729">database.yml</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3729/database.yml">database.yml</a> added</li></ul><p>Thank you very much .</p>
<p>Here is the explain of BitNami:http://bitnami.org/learn_more</p>
<p>my database.yml exits.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=166142010-05-10T11:02:18ZToshi MARUYAMA
<ul></ul><p>Set PATH to your ruby.exe installed path.</p>
<pre>
set PATH=%PATH%;R:\Ruby\bin
</pre>
<p>You can use control panel too.</p>
<pre>
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
</pre> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=166252010-05-11T01:02:43Zxiaoyu yin
<ul></ul><p>Maybe I can use the Bitnami's control panel?</p>
<p>like the annex</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=166262010-05-11T01:58:46ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/3739">Japanese-Windows-set-env.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3739/Japanese-Windows-set-env.png">Japanese-Windows-set-env.png</a> added</li></ul><p>PATH is environment variable.<br /><a class="external" href="http://en.wikipedia.org/wiki/Environment_variable">http://en.wikipedia.org/wiki/Environment_variable</a></p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=166282010-05-11T02:49:16Zxiaoyu yin
<ul><li><strong>File</strong> <a href="/attachments/3740">环境变量-中文.bmp</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3740/%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F-%E4%B8%AD%E6%96%87.bmp">环境变量-中文.bmp</a> added</li></ul><p>I've already set this to chinese by adding a system Environment_variable LANGUAGE zh_CN.</p>
<p>and I can't use the rake command in ruby/bin directory too.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=166292010-05-11T03:28:20ZToshi MARUYAMA
<ul></ul><pre>
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\;...
</pre> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=166302010-05-11T03:42:00ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/3741">japanese-windows-set-env-ruby.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3741/japanese-windows-set-env-ruby.png">japanese-windows-set-env-ruby.png</a> added</li></ul> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=172042010-06-08T07:30:05Zxiaoyu yin
<ul><li><strong>File</strong> <a href="/attachments/3927">migrate_result.txt</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3927/migrate_result.txt">migrate_result.txt</a> added</li></ul><p>Sorry for so long time to test it.<br />I have run migrate command successfully, but the option doesn't been added.<br />I test it for several times, only once I can see the adition option but even this, there still shows error on chinese codes.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=172102010-06-08T10:01:44ZToshi MARUYAMA
<ul></ul><p>I recommend you to manage redmine source with git or Mercurial.</p>
<p>Git repositry.<br /><a class="external" href="http://github.com/edavis10/redmine">http://github.com/edavis10/redmine</a><br />Mercurial repository.<br /><a class="external" href="http://bitbucket.org/svn/redmine">http://bitbucket.org/svn/redmine</a><br />Yuya's (patch author) MQ repository.<br /><a class="external" href="http://bitbucket.org/yuja/redmine-mq/src">http://bitbucket.org/yuja/redmine-mq/src</a><br /><a class="external" href="http://bitbucket.org/yuja/redmine-mq-issue4455">http://bitbucket.org/yuja/redmine-mq-issue4455</a></p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=172322010-06-08T22:26:52ZToshi MARUYAMA
<ul></ul><p>Redmine hg adapter has LANG problem <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: mercurial_adapter should ensure the right LANG environment variable (Closed)" href="https://www.redmine.org/issues/5117">#5117</a>.<br />If Redmine runs as Windows service, you need to remove LANG env from system or apply <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: mercurial_adapter should ensure the right LANG environment variable (Closed)" href="https://www.redmine.org/issues/5117">#5117</a> patch. For TortoiseHg you can set user LANG env.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=172362010-06-09T08:00:13Zxiaoyu yin
<ul></ul><p>Oh, it's luckly today. I had to uninstall the redmine and reinstall it. Then creat hg repository in redmine folder. <br />And then import the patch. And then restart the redmine service. It works!! The path_encoding column was added successfully.</p>
<p>I repeat the steps above, it works too.</p>
<p>So, there's no error code now.</p>
<p>Thank you Toshi Maruyama! The problem solved.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=172372010-06-09T08:41:23ZToshi MARUYAMA
<ul></ul><p>Please set this issue related to <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Mercurial: Repository path encoding of non UTF-8 characters (Closed)" href="https://www.redmine.org/issues/2664">#2664</a>.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=172392010-06-09T08:57:52Zxiaoyu yin
<ul></ul><p>Ok. Also, I run the "rake db:migrate RAILS_ENV=production" command. It's necessary.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=172422010-06-09T09:21:20ZToshi MARUYAMA
<ul></ul><p>Xiaoyu, thanks for posting message at <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Mercurial: Repository path encoding of non UTF-8 characters (Closed)" href="https://www.redmine.org/issues/2664">#2664</a>.</p>
<p>Contributor, please set this issue related to <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Mercurial: Repository path encoding of non UTF-8 characters (Closed)" href="https://www.redmine.org/issues/2664">#2664</a> because I don't have a right to set issue relation.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=172572010-06-10T07:53:21Zxiaoyu yin
<ul></ul><p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Mercurial: Repository path encoding of non UTF-8 characters (Closed)" href="https://www.redmine.org/issues/2664">#2664</a></p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=172582010-06-10T07:54:07Zxiaoyu yin
<ul></ul><p>How can I do it?</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=172592010-06-10T08:11:18ZToshi MARUYAMA
<ul></ul><p>xiaoyu yin wrote:</p>
<blockquote>
<p>How can I do it?</p>
</blockquote>
<p>You and I don't have a right to set issue relation on this Redmine.<br />For example, this issue is related to <a class="issue tracker-1 status-5 priority-6 priority-highest closed" title="Defect: 当HG库的路径中有中文目录,或者文件有中文名称时,中文显示为乱码,如图.When there is chinese (Closed)" href="https://www.redmine.org/issues/5407">#5407</a> .</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=197472010-08-25T22:38:48ZEric Davis
<ul><li><strong>Priority</strong> changed from <i>Urgent</i> to <i>Normal</i></li></ul><p>I can't tell if this issue is resolved or not. Any else know what's going on here?</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=197522010-08-25T22:46:56ZToshi MARUYAMA
<ul></ul><p>Eric Davis wrote:</p>
<blockquote>
<p>I can't tell if this issue is resolved or not. Any else know what's going on here?</p>
</blockquote>
<p>This is duplicate with <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Mercurial: Repository path encoding of non UTF-8 characters (Closed)" href="https://www.redmine.org/issues/2664">#2664</a>.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=197592010-08-25T22:51:21ZToshi MARUYAMA
<ul></ul><p>And this issue is related with <a class="issue tracker-1 status-5 priority-3 priority-lowest closed" title="Defect: Git: Repository path encoding of non UTF-8 characters (Closed)" href="https://www.redmine.org/issues/5251">#5251</a>.</p> Redmine - Defect #5408: Mercurial and chinese codehttps://www.redmine.org/issues/5408?journal_id=236102011-01-01T23:09:09ZToshi MARUYAMA
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>Resolution</strong> changed from <i>Fixed</i> to <i>Duplicate</i></li></ul>