threads / discuss / 28286

Special characters in file name

Subject: Special characters in file name

## tl;dr

9 messages between Sep 2, 2011 and Sep 5, 2011.

replies: 8people: 5as markdown or json

Tajti Ákos· Sep 2, 2011, 12:06 UTC · lore
Dear List,

I have a file named "árvíz.txt" in my repository. When modify that file and execute git diff, the first line looks like this:

diff --git "a/\303\241rv\303\255z.txt" "b/\303\241rv\303\255z.txt"

Is there an option that (if specified) will get git to print "árvíz.txt" 
instead of this escaped string?

Thanks in advance,
Ákos Tajti
Alexey Shumkin· Sep 2, 2011, 12:38 UTC · re: Tajti Ákos · lore

Re: Special characters in file name

Tajti Ákos <akos.tajti <at> intland.com> writes:
Show 13 quoted lines
> 
> Dear List,
> 
> I have a file named "árvíz.txt" in my repository. When modify that file 
> and execute git diff, the first line looks like this:
> diff --git "a/\303\241rv\303\255z.txt" "b/\303\241rv\303\255z.txt"
> 
> Is there an option that (if specified) will get git to print "árvíz.txt" 
> instead of this escaped string?
> 
> Thanks in advance,
> Ákos Tajti
> 

please, refresh your memory ))) http://comments.gmane.org/gmane.comp.version-control.git/177849

see my comment http://permalink.gmane.org/gmane.comp.version-control.git/177857

Jonathan Nieder· Sep 3, 2011, 14:46 UTC · re: Alexey Shumkin · lore

Re: Special characters in file name

Hi Alexey,
Alexey Shumkin wrote:
> Tajti Ákos writes:
Show 6 quoted lines
>> I have a file named "árvíz.txt" in my repository. When modify that file 
>> and execute git diff, the first line looks like this:
>> diff --git "a/\303\241rv\303\255z.txt" "b/\303\241rv\303\255z.txt"
>>
>> Is there an option that (if specified) will get git to print "árvíz.txt" 
>> instead of this escaped string?
[...]
Show 5 quoted lines
> please, refresh your memory )))
> http://comments.gmane.org/gmane.comp.version-control.git/177849
>
> see my comment
> http://permalink.gmane.org/gmane.comp.version-control.git/177857

Cc-ing Ákos so he can actually get your message this time. :) (FWIW the convention on this list is always to reply-to-all.)

Thanks, Jonathan

Alexey Shumkin· Sep 3, 2011, 20:09 UTC · re: Jonathan Nieder · lore

Re: Special characters in file name

Show 20 quoted lines
> Hi Alexey,
> 
> Alexey Shumkin wrote:
> > Tajti Ákos writes:
> 
> >> I have a file named "árvíz.txt" in my repository. When modify that
> >> file and execute git diff, the first line looks like this:
> >> diff --git "a/\303\241rv\303\255z.txt" "b/\303\241rv\303\255z.txt"
> >>
> >> Is there an option that (if specified) will get git to print
> >> "árvíz.txt" instead of this escaped string?
> [...]
> > please, refresh your memory )))
> > http://comments.gmane.org/gmane.comp.version-control.git/177849
> >
> > see my comment
> > http://permalink.gmane.org/gmane.comp.version-control.git/177857
> 
> Cc-ing Ákos so he can actually get your message this time. :)  (FWIW
> the convention on this list is always to reply-to-all.)

Yes, I know, but I replied with the gmane.org site form, and it did not CC-ed

Tajti Ákos· Sep 5, 2011, 12:14 UTC · re: Alexey Shumkin · lore

Re: Special characters in file name

Thanks four your answer. However, it didn't help. After setting the core.quotepath option to false I get this:

diff --git a/<E1>rv<ED>zt<FB>r<F5> b/<E1>rv<ED>zt<FB>r<F5>

Is there a solution?

Thanks,
Ákos Tajti

2011.09.03. 22:09 keltezéssel, Alexey Shumkin írta:
>> Hi Alexey,
>>
>> Alexey Shumkin wrote:
>>> Tajti Ákos writes:
>>>> I have a file named "árvíz.txt" in my repository. When modify that
>>>> file and execute git diff, the first line looks like this:
>>>> diff --git "a/\303\241rv\303\255z.txt" "b/\303\241rv\303\255z.txt"
>>>>
>>>> Is there an option that (if specified) will get git to print
>>>> "árvíz.txt" instead of this escaped string?
>> [...]
>>> please, refresh your memory )))
>>> http://comments.gmane.org/gmane.comp.version-control.git/177849
>>>
>>> see my comment
>>> http://permalink.gmane.org/gmane.comp.version-control.git/177857
>> Cc-ing Ákos so he can actually get your message this time. :)  (FWIW
>> the convention on this list is always to reply-to-all.)
> Yes, I know, but I replied with the gmane.org site form, and it did not
> CC-ed
Johannes Sixt· Sep 5, 2011, 13:16 UTC · re: Tajti Ákos · lore

Re: Special characters in file name

Am 9/5/2011 14:14, schrieb Tajti Ákos:
Show 6 quoted lines
> Thanks four your answer. However, it didn't help. After setting the
> core.quotepath option to false I get this:
> 
> diff --git a/<E1>rv<ED>zt<FB>r<F5> b/<E1>rv<ED>zt<FB>r<F5>
> 
> Is there a solution?

This is because the output goes through the pager (less), which treats non-ASCII characters.

Tweak your settings (LESSCHARSET) or use a different or no pager.
-- Hannes
Tajti Ákos· Sep 5, 2011, 13:33 UTC · re: Johannes Sixt · lore

Re: Special characters in file name

Thank you very much, setting LESSCHARSET solved this last problem!
Ákos
2011.09.05. 15:16 keltezéssel, Johannes Sixt írta:
Show 13 quoted lines
> Am 9/5/2011 14:14, schrieb Tajti Ákos:
>> Thanks four your answer. However, it didn't help. After setting the
>> core.quotepath option to false I get this:
>>
>> diff --git a/<E1>rv<ED>zt<FB>r<F5>  b/<E1>rv<ED>zt<FB>r<F5>
>>
>> Is there a solution?
> This is because the output goes through the pager (less), which treats
> non-ASCII characters.
>
> Tweak your settings (LESSCHARSET) or use a different or no pager.
>
> -- Hannes
Jakub Narebski· Sep 3, 2011, 19:57 UTC · re: Tajti Ákos · lore

Re: Special characters in file name

Tajti Ákos <akos.tajti@intland.com> writes:
Show 6 quoted lines
> I have a file named "árvíz.txt" in my repository. When modify that
> file and execute git diff, the first line looks like this:
> diff --git "a/\303\241rv\303\255z.txt" "b/\303\241rv\303\255z.txt"
> 
> Is there an option that (if specified) will get git to print
> "árvíz.txt" instead of this escaped string?
Yes, there is, namely `core.quotepath`.

This probably should make it into FAQ on Git Wiki, and into git-diff manpage...

-- 
Jakub Narębski
Tajti Ákos· Sep 5, 2011, 13:12 UTC · lore

Re: Special characters in file name

Both the terminal encoding and the filename encoding are UTF-8.
Ákos
2011.09.05. 15:02 keltezéssel, Шумкин Алексей írta:
Show 37 quoted lines
>> Thanks four your answer. However, it didn't help. After setting the
>> core.quotepath option to false I get this:
>>
>> diff --git a/<E1>rv<ED>zt<FB>r<F5>  b/<E1>rv<ED>zt<FB>r<F5>
>>
>> Is there a solution?
> What terminal encoding do you use? and what is its encoding?
> It seems to me terminal encoding is UTF-8 but filename encoding is not
> the same.
> I get the same behaviour on Linux UTF-8 terminal for the project
> created on Windows with filenames in cp1251-encoding.
>
>> Thanks,
>> Ákos Tajti
>>
>> 2011.09.03. 22:09 keltezéssel, Alexey Shumkin írta:
>>>> Hi Alexey,
>>>>
>>>> Alexey Shumkin wrote:
>>>>> Tajti Ákos writes:
>>>>>> I have a file named "árvíz.txt" in my repository. When modify
>>>>>> that file and execute git diff, the first line looks like this:
>>>>>> diff --git "a/\303\241rv\303\255z.txt"
>>>>>> "b/\303\241rv\303\255z.txt"
>>>>>>
>>>>>> Is there an option that (if specified) will get git to print
>>>>>> "árvíz.txt" instead of this escaped string?
>>>> [...]
>>>>> please, refresh your memory )))
>>>>> http://comments.gmane.org/gmane.comp.version-control.git/177849
>>>>>
>>>>> see my comment
>>>>> http://permalink.gmane.org/gmane.comp.version-control.git/177857
>>>> Cc-ing Ákos so he can actually get your message this time. :)
>>>> (FWIW the convention on this list is always to reply-to-all.)
>>> Yes, I know, but I replied with the gmane.org site form, and it did
>>> not CC-ed

← back to recent threads