-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't access remote repository if the URL contains Chinese word #945
Comments
----- Original Message -----
Setup One of the following:
Study some, and compare the changes between 2.10.0 and 2.10.1, then I guess the changes of url.c in Also see TortoiseGit issue 2859 Details
Add a remote and its URL contains Chinese word(s). Then can't perform clone/fetch/push anymore. Note: English URL works fine.
Like Git Bash does: $ git.exe clone --progress -v "D:\Temp\i2859\Test中文.git" "D:\Temp\i2859\Test中文2.10.2" Please make sure you have the correct access rights Warning: Your console font probably doesn't support Unicode. If you experience strange characters in the output, consider switching to a TrueType font such as Consolas! hello, I think this warning message "Your console font probably doesn't support Unicode. If you experience strange characters in the output, consider switching to a TrueType font such as Consolas!" Is at the heart of the problem. It looks like an encoding problem. Git assumes you use UTF-8 unicode. I guess that is not how your chinese characters/words are being encoded when passed to git, so while they are displayed correctly on screen, they are different 8-bit byte sequences. Try the suggestion of "switching to a TrueType font such as Consolas" and seeing if that has an effect. Philip |
Hi, I test it again with true type:
That warning is gone. Note: Git Bash works fine, but Windows Command Prompt. |
Post earlier testing results: (TortoiseGit calls git.exe) As you can see:
So, I compared the code between tag |
Please call |
@dscho OH~ YES~ Thank you!!!!! |
Hi, I still suspect that it's an encoding issue. Your results show that this is not a problem for GfW 2.10.1/2 from git bash, so we are doing something right. The results then show that when TortoiseGit does the command then it fails. So it will be somewhere in the tortoiseGit interface. (with the same suspect that it is a 'bad' code page / encoding issue). Can you capture the two strings as byte sequences to see if they follow the UTF-8 and code page encodings? P. Post earlier testing result: (TortoiseGit calls git.exe) As you can see:
|
TortoiseGit interface shows those two strings normally: So, I guess it follows. :-) |
I can build Git for Windows and its installer now. Then, I tested the installer which revert the change by the commit I suspected, say commit d233097. The result is that clone still does not work. So, I think that that commit can be excluded. :-) |
I know Git for Windows can be built with VS2015 since 2.10.2. So, my next step may be debug it with VS2015? right? |
I built 2.10.0 and made a installer, then can't clone. XD Looks like it's not source code problem. Any idea? |
It maybe that your build completed, and overwrote your current install (within the sdk), and that there is some issue with your build. Does your regular Git still work. |
@YueLinHo is there a chance to teach TortoiseGit to set |
I am not sure. I guess TortoiseGit can do so. I will find time to try it. (@csware Can TortoiseGit do it?)
I think it would help. ^_^ |
TortoiseGit could set |
Right. So, you remind me that I want to know why my GfW 2.10.0 installer does not work out. |
The regression where Git would not interpret non-ASCII characters passed from a CMD window correctly [has been fixed](git-for-windows/git#945). Signed-off-by: Johannes Schindelin <[email protected]>
@csware obviously I meant "unless |
@YueLinHo Would you kindly open a new ticket with a concise description what you tried and what you expected and what you got instead? |
Sure. See #965. ^_^ |
Found there is a similar issue, say #1036, So I remove my system env, var. ScreenshotResultLooks like the issue is not fixed. CLI - One of the Error Message
Git Gui - One of the Error Message
TortoiseGitTortoiseGit 2.3.4+ has the same fix, and it works for me. Here is the testing of 2.3.8:
After adding that system env. var. back, everything works. |
Suppose this issue is not just for Chinese words, but also for non-ASCII characters. |
Setup
64 bit
Win7 64 Pro
Suppose 2.10.1 has the same issue.
Study some, and compare the changes between 2.10.0 and 2.10.1, then I guess the changes of url.c in
commit introduce hex2chr() for converting two hexadecimal digits to a character may be the key?
Also see TortoiseGit issue 2859
Details
CMD
Can't clone if URL contains Chinese word(s)
Or add a remote and its URL contains Chinese word(s). Then can't perform fetch/push anymore.
Note: English URL works fine.
Like Git Bash does:
Update 1
TortoiseGit interface shows those two strings normally:
And test with true type in
cmd.exe
:That warning is gone.
Update 2
Other testing results: (TortoiseGit calls git.exe)
As you can see:
Workaround
call
set LC_ALL=C
incmd.exe
The text was updated successfully, but these errors were encountered: