Defect #5251
closedGit: Repository path encoding of non UTF-8 characters
100%
Description
If filename include Scandinavian character, Redmine convert them another character. In this case, filename TEKIJÄT replaces string "TEKIJ\303\204T".
Files
Related issues
Updated by Toshi MARUYAMA over 14 years ago
Try "git config --global core.quotepath false".
Updated by Toshi MARUYAMA over 14 years ago
If your filename encoding is not UTF-8, try #2664 patches.
Updated by Felix Schäfer over 14 years ago
I'd have told you to try to set RedmineSettings to whatever locale "scandinavian" is, but it seems it pertains only to file contents, not file names.
Updated by Toshi MARUYAMA over 14 years ago
http://www.redmine.org/issues/2664#note-4
Mercurial (and also Git) treats file names as byte string.
Here we need to convert them to UTF-8,
but, there's no reliable info about file name encoding.
Updated by Toshi MARUYAMA almost 14 years ago
- Subject changed from Redmine can't show Scandinavian character in filenames in git repository to Git: Redmine can't show Scandinavian character in filenames in git repository
Updated by Toshi MARUYAMA almost 14 years ago
Updated by Toshi MARUYAMA almost 14 years ago
- Priority changed from Normal to Low
Ruby 1.9 compatibility is very serious.
Updated by Toshi MARUYAMA almost 14 years ago
- Subject changed from Git: Redmine can't show Scandinavian character in filenames in git repository to Git: Repository path encoding of non UTF-8 characters
- Assignee set to Toshi MARUYAMA
Updated by Toshi MARUYAMA almost 14 years ago
- Status changed from New to Closed
- Assignee deleted (
Toshi MARUYAMA) - Resolution set to Wont fix
It is impossible to fix this issue in current git adapter scheme.
Please see r5027 comment.
Updated by Toshi MARUYAMA almost 14 years ago
- Status changed from Closed to Reopened
- Assignee set to Toshi MARUYAMA
- Resolution deleted (
Wont fix)
Updated by Toshi MARUYAMA almost 14 years ago
Toshi MARUYAMA wrote:
It is impossible to fix this issue in current git adapter scheme.
Please see r5027 comment.
$ git cat-file commit f85f88f507577dd2fa197db9e330875b2ea0757f tree 887f4cf35a6ed3acd3bf72843b65884d8f637029 parent 57ca437c0acbbcb749821fdf3726a1367056d364 author jsmith <jsmith@foo.bar> 1285909440 -0500 committer jsmith <jsmith@foo.bar> 1285909440 -0500 copy latin-1 file. --HG-- rename : latin-1-dir/test-?.txt => latin-1-dir/test-?-1.txt
$ git cat-file commit 67e7792ce20ccae2e4bb73eed09bb397819c8834 | iconv -f ISO-8859-1 -t UTF-8 tree 1ec7b464f0331a7d597ee2461ec58b3a0af11114 parent 7234cb2750b63f47bff735edc50a1c0a433c2518 author test latin-1 ÀÈÁÉÂÊÃËÄÅÆÇ <test@example.com> 1285909200 -0500 committer test latin-1 ÀÈÁÉÂÊÃËÄÅÆÇ <test@example.com> 1285909200 -0500 encoding ISO-8859-1 latin-1 ÀÈÁÉÂÊÃËÄÅÆÇ
Git log is binary, and f85f88f507577d log is broken.
Updated by Jean-Philippe Lang almost 14 years ago
r5049 broke all git tests with the git version currently used on the CI server (http://www.redmine.org/builds/index.html). The -c option was introduced in a recent git version (1.7.2). Is there any workaround for older versions?
Updated by Toshi MARUYAMA almost 14 years ago
- Status changed from Reopened to 7
- Target version set to 1.2.0
Updated by Toshi MARUYAMA almost 14 years ago
Jean-Philippe Lang wrote:
r5049 broke all git tests with the git version currently used on the CI server (http://www.redmine.org/builds/index.html). The -c option was introduced in a recent git version (1.7.2). Is there any workaround for older versions?
Updated by Toshi MARUYAMA almost 14 years ago
- File Shift_JIS.png Shift_JIS.png added
- Status changed from 7 to Closed
- % Done changed from 90 to 100
- Resolution set to Fixed
I finished implementing in r5072.
Limitation¶
- Subversion supports URL encoding path and Redmine uses it.
Mercurial adapter helper extension wraps path with URL encoding.
Git adapter uses byte string to call "git" command.
Because Ruby uses ANSI api to fork a process on Windows,
it may have trouble in different locale on Windows. - Git adapter uses "-c core.quotepath=false" if git version is above 1.7.2
at source:trunk/lib/redmine/scm/adapters/git_adapter.rb@5069#L342 .
If your git is older than 1.7.2, you need to set "core.quotepath=false" in "config". - Japanese Shift_JIS and Traditional Chinese Big5 have 0x5c(backslash) problem.
Updated by Toshi MARUYAMA over 13 years ago
Toshi MARUYAMA wrote:
- Subversion supports URL encoding path and Redmine uses it.
Mercurial adapter helper extension wraps path with URL encoding.
Git adapter uses byte string to call "git" command.
Because Ruby uses ANSI api to fork a process on Windows,
it may have trouble in different locale on Windows.
Related Ruby issue:
Bug 1771
system()/popen()/popen3() & windows & unicode is not working
http://redmine.ruby-lang.org/issues/show/1771