Skip to contentSkip to conversation

Umlaut in filename makes troubles

DISCUSSION [email protected] 4 participants 8 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I have problems with my repository under slackware vs. windows. I created a repo in linux and every time I use it under msysgit, the files containing umlauts in the filename are marked as deleted (and vice versa).

For instance: the repo perfectly synced under msysgit leads to:

user@sauron:/media/disk-2$ git status |grep Auszug
#       deleted:    "trunk/007_Literatur/Auszug aus Ergonomische 
Untersuchung des Lenkgef\374hles.docx"
#       "trunk/007_Literatur/Auszug aus Ergonomische Untersuchung des 
Lenkgef\303\274hles.docx"

in linux. But the file exists and is displayed correctly in the shell or in dolphin (my filemanager under X):

user@sauron:/media/disk-2$ ls trunk/007_Literatur/Auszug*
trunk/007_Literatur/Auszug aus Ergonomische Untersuchung des 
Lenkgefühles.docx

Can you please give me a hint what to do?

TIA

#1 lore raw
Quoted 13 lines · On 2009-12-01 08:15:08, [email protected] wrote:

I have problems with my repository under slackware vs. windows. I created a repo in linux and every time I use it under msysgit, the files containing umlauts in the filename are marked as deleted (and vice versa).

For instance: the repo perfectly synced under msysgit leads to:

user@sauron:/media/disk-2$ git status |grep Auszug
#       deleted:    "trunk/007_Literatur/Auszug aus Ergonomische 
Untersuchung des Lenkgef\374hles.docx"
#       "trunk/007_Literatur/Auszug aus Ergonomische Untersuchung des 
Lenkgef\303\274hles.docx"
Quoted 8 lines

in linux. But the file exists and is displayed correctly in the shell or in dolphin (my filemanager under X):

user@sauron:/media/disk-2$ ls trunk/007_Literatur/Auszug*
trunk/007_Literatur/Auszug aus Ergonomische Untersuchung des 
Lenkgefühles.docx

Can you please give me a hint what to do?

Try to specify "utf8" as mount option under Linux. You can also try experimenting with the "nls" mount option, check out the mount(8) man page to see how it's used.

Additionally, I found that I need "shortname=mixed" when mounting USB memory cards. As filenames are case insensitive in Windowsworld and gadgets using vfat, Linux tend to treat them differently.

Regards,
Øyvind

+-| Øyvind A. Holm <[email protected]> - N 60.39548° E 5.31735° |-+
| OpenPGP: 0xFB0CBEE894A506E5 - http://www.sunbase.org/pubkey.asc |
| Fingerprint: A006 05D6 E676 B319 55E2  E77E FB0C BEE8 94A5 06E5 |
+------------| 760e5d4a-de4c-11de-a982-90e6ba3022ac |-------------+
author
#2 lore raw
Quoted 17 lines · Øyvind A. Holm
Quoted 16 lines · On 2009-12-01 08:15:08, [email protected] wrote:

I have problems with my repository under slackware vs. windows. I created a repo in linux and every time I use it under msysgit, the files containing umlauts in the filename are marked as deleted (and vice versa).

For instance: the repo perfectly synced under msysgit leads to:

user@sauron:/media/disk-2$ git status |grep Auszug
#       deleted:    "trunk/007_Literatur/Auszug aus Ergonomische
Untersuchung des Lenkgef\374hles.docx"
#       "trunk/007_Literatur/Auszug aus Ergonomische Untersuchung
des Lenkgef\303\274hles.docx"

in linux. But the file exists and is displayed correctly in the shell or in dolphin (my filemanager under X):

Quoted 7 lines
Quoted 5 lines
user@sauron:/media/disk-2$ ls trunk/007_Literatur/Auszug*
trunk/007_Literatur/Auszug aus Ergonomische Untersuchung des
Lenkgefühles.docx

Can you please give me a hint what to do?

Try to specify "utf8" as mount option under Linux.

The automount of KDE 4.2.4 already used utf-8 (I guess the filenames would be garbled in dolphin otherwise)

Quoted 3 lines

You can also try
experimenting with the "nls" mount option, check out the mount(8) man page to see how it's used.

Ufff, I'm sorry - I'm not sure how to pass this to the automouter. I'd tried to mount the stick manually (with and without utf) and without utf8 the filenames are display strange from "ls".

Quoted 3 lines

Additionally, I found that I need "shortname=mixed" when mounting USB memory cards. As filenames are case insensitive in Windowsworld and gadgets using vfat, Linux tend to treat them differently.

My automouter done it as

/dev/sde on /media/disk-2 type vfat (rw,nosuid,nodev,uhelper=hal,uid=1000,utf8,shortname=mixed)

So the options look right to me.

Kindest regards
Jochen

#3 lore raw
In reply to [email protected]

[email protected] venit, vidit, dixit 01.12.2009 08:15:

Quoted 13 lines

I have problems with my repository under slackware vs. windows. I created a repo in linux and every time I use it under msysgit, the files containing umlauts in the filename are marked as deleted (and vice versa).

For instance: the repo perfectly synced under msysgit leads to:

user@sauron:/media/disk-2$ git status |grep Auszug
#       deleted:    "trunk/007_Literatur/Auszug aus Ergonomische 
Untersuchung des Lenkgef\374hles.docx"
#       "trunk/007_Literatur/Auszug aus Ergonomische Untersuchung des 
Lenkgef\303\274hles.docx"
Quoted 8 lines

in linux. But the file exists and is displayed correctly in the shell or in dolphin (my filemanager under X):

user@sauron:/media/disk-2$ ls trunk/007_Literatur/Auszug*
trunk/007_Literatur/Auszug aus Ergonomische Untersuchung des 
Lenkgefühles.docx

Can you please give me a hint what to do?

I would say you can give us more info about your setup. If I understand you correctly, you use the same repo and checkout under linux and msysgit. What kind of filesystem is this on, what are the mount options? What is your locale ($LANG) in slackware?

Michael

author
#4 lore raw
Quoted 20 lines · Michael J Gruber
Quoted 20 lines

I have problems with my repository under slackware vs. windows. I created a repo in linux and every time I use it under msysgit, the files containing umlauts in the filename are marked as deleted (and vice versa).

For instance: the repo perfectly synced under msysgit leads to:

user@sauron:/media/disk-2$ git status |grep Auszug
#       deleted:    "trunk/007_Literatur/Auszug aus Ergonomische
Untersuchung des Lenkgef\374hles.docx"
#       "trunk/007_Literatur/Auszug aus Ergonomische Untersuchung
des Lenkgef\303\274hles.docx"

in linux. But the file exists and is displayed correctly in the shell or in dolphin (my filemanager under X):

user@sauron:/media/disk-2$ ls trunk/007_Literatur/Auszug*
trunk/007_Literatur/Auszug aus Ergonomische Untersuchung des
Lenkgefühles.docx
Quoted 5 lines
Quoted 1 line

Can you please give me a hint what to do?

I would say you can give us more info about your setup. If I understand you correctly, you use the same repo and checkout under linux and msysgit.

Right - I created it under linux on a local directory, cloned it to an usb-stick and cloned it again under windows.
I then worked under windows (msysgit) and pushed it to the stick again.
Now I am back an my linux maschine and the files with umlauts in the filenames are mared as deleted.

Quoted 2 lines
Quoted 1 line

What kind of filesystem is this on, what are the

mount options?

/dev/sde on /media/disk-2 type vfat (rw,nosuid,nodev,uhelper=hal,uid=1000,utf8,shortname=mixed)

mounted by the automounter of KDE 4.2.4

Quoted 1 line

What is your locale ($LANG) in slackware?

LANG=de_AT.utf-8

Jochen

#5 lore raw
In reply to [email protected]
Quoted 5 lines · On Tue, 1 Dec 2009, [email protected] wrote:

I have problems with my repository under slackware vs. windows. I created a repo in linux and every time I use it under msysgit, the files containing umlauts in the filename are marked as deleted (and vice versa).

Quoted 7 lines

For instance: the repo perfectly synced under msysgit leads to:

user@sauron:/media/disk-2$ git status |grep Auszug
#       deleted:    "trunk/007_Literatur/Auszug aus Ergonomische 
Untersuchung des Lenkgef\374hles.docx"
#       "trunk/007_Literatur/Auszug aus Ergonomische Untersuchung des 
Lenkgef\303\274hles.docx"

So the directory contains the utf-8 name, but the index contains a latin-1 name, when you wrote it under Windows and are looking at it under Linux. You probably want to use utf-8 for your repository, so that it's not specific to your locale.

Quoted 6 lines

in linux. But the file exists and is displayed correctly in the shell or in dolphin (my filemanager under X):

user@sauron:/media/disk-2$ ls trunk/007_Literatur/Auszug*
trunk/007_Literatur/Auszug aus Ergonomische Untersuchung des 
Lenkgefühles.docx

You've got a utf-8 filesystem, so the u-with-umlaut is the two-byte sequence git is showing in the message as being present, not the single byte that it's showing as deleted. It looks like you're actually using utf-8 for what's on the usb stick, so you probably want the names listed in the repository to match that, which means that the correct one here is Linux.

Quoted 1 line

Can you please give me a hint what to do?

Convince Windows (or msysgit) to report filenames to git in utf-8. (I don't know *how*, but that's *what* you probably want to do.)

Once you've got everything agreeing on the character set used for filenames, you can disable "core.quotepath" to make the messages appear with umlauts; if you turned that off before fixing the inconsistancy, it would be much trickier to debug, because the "deleted" line would contain something that your Linux display won't consider a valid character.

-Daniel
*This .sig left intentionally blank*

author
#6 lore raw
In reply to [email protected]

I found another strange effect...

I made a file with "touch aöäü.txt" and from "git status" I get
# "a\303\266\303\244\303\274.txt"
reported as untracked. But when I start "git gui" I get file displayed with it's correct name...

#7 lore raw

Jochen venit, vidit, dixit 01.12.2009 10:58:

Quoted 7 lines

I found another strange effect...

I made a file with "touch aöäü.txt" and from "git status" I get
# "a\303\266\303\244\303\274.txt"
reported as untracked. But when I start "git gui" I get file displayed with it's correct name...

Does this change after

git config core.quotepath false

Michael