You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Syncthing should offer fixing UTF-8 encoding issues/conflicts #430
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
File "..." contains non-NFC UTF-8 sequences and cannot be synced. Consider renaming.
many times on many files.
I don't know what non-NFC means. Message should be more clear.
Syncthing should sync all files regardless of their names. These are both Windows 7 machines, so there's no compatibility problem between the OSes. If there is a problem, like Linux using ":" in filenames and syncing with Windows, it should sync the files anyway and sanitize the names for each OS.
(It seems most of these files contain "Ω" (ohm sign) in the filename, while NFC wants it to be converted to "Ω" (capital Omega) for transmission? I don't see why it can't just use the same "ohm sign" filename on both ends, though. Anyway, the software should handle things like this automatically.)
It's not that simple; #329. The filenames are incorrectly encoded for your platform; you probably got them from someone who created them on a Mac? They need to be renamed in Windows.
The file names were created in Windows Explorer and Windows accepts both filenames without problems:
Syncthing does not:
File "filenames\ohm sign Ω.txt" contains non-NFC UTF-8 sequences and cannot be synced. Consider renaming.
For comparison, BTSync passed the ohm sign to both computers that were synced without complaints, while Dropbox normalized to Omega on both computers without complaints.
The issue isn't the character Ω but the fact that it can be represented in two different ways ("NFC" and "NFD"). It's the same character either way, and syncthing will understand and transmit that character, but not how it was originally encoded. So you could in fact have two files both named omega Ω.txt, but the Ω encoded in two different ways. There is no reasonable way for syncthing to handle this situation, so it refuses to try.
The "NFC" way is the standard way in Windows and what is produced if you type that key on your keyboard.
Right, so as it stands, this is expected behavior (although I can see that it can be annoying).
Syncthing expects filenames to be in the standard encoding for the operating system and platform in question. On Windows that means UTF-8 NFC. We do this because we want to be able to translate the name correctly to whatever is expected on the target system, or it'll look like crap there and can potentially cause data loss. For example, here's what happens on my computer if I have a file called Ω (omega) and try to create one called Ω (ohm sign):
This happens because the Mac filesystem enforces normalized names, much like syncthing does. We do the same for names containing invalid characters (but on the receiving end, since what is considered invalid is very system dependent).
There won't be any song and dance with replacing characters; what if we rename the file Ω.txt to _.txt, but there already is a _.txt on the other system, etc...
They're not the same character, but they are canonically equivalent. Yes, you can create two files named "Ω.txt" and "Ω.txt" in the same folder, on both Windows and Linux. In this case, since Dropbox normalizes them, it converts one filename to "Ω (Unicode Encoding Conflict).txt".
If the software isn't going to change anything automatically, it should at least point out which character is causing the problem and offer to fix it for you:
File "100 Ω.txt" cannot be synchronized because name contains non-normalized Unicode character(s) "Ω". Is it ok to rename file using equivalent characters: "100 Ω.txt"?
There won't be any song and dance with replacing characters; what if we rename the file Ω.txt to _.txt, but there already is a _.txt on the other system, etc...
It should be fine to convert "Ω.txt" (ohm) to "Ω.txt" (Omega), and if "Ω.txt" already exists, make it "Ω (2).txt" or something?
What does the automatic fix do to the filenames? Does it rename them to conform to the system standard on syncing? Presumably it does not rename files which are present locally, right?
It renames files that are UTF8 but in the wrong normalization form for the current system, yes. This is something that pretty much only happens when files are moved on USB sticks and similar without conversion between PC and Mac, and when the filenames contain accented characters (or some other special cases).
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
Activity
endolith commentedon Jul 22, 2014
(It seems most of these files contain "Ω" (ohm sign) in the filename, while NFC wants it to be converted to "Ω" (capital Omega) for transmission? I don't see why it can't just use the same "ohm sign" filename on both ends, though. Anyway, the software should handle things like this automatically.)
endolith commentedon Jul 22, 2014
actually it was only 2 files, but it gave me 2 duplicate notifications for each. that should be fixed
calmh commentedon Jul 22, 2014
It's not that simple; #329. The filenames are incorrectly encoded for your platform; you probably got them from someone who created them on a Mac? They need to be renamed in Windows.
endolith commentedon Jul 22, 2014
The file names were created in Windows Explorer and Windows accepts both filenames without problems:
Syncthing does not:
For comparison, BTSync passed the ohm sign to both computers that were synced without complaints, while Dropbox normalized to Omega on both computers without complaints.
calmh commentedon Jul 22, 2014
The issue isn't the character Ω but the fact that it can be represented in two different ways ("NFC" and "NFD"). It's the same character either way, and syncthing will understand and transmit that character, but not how it was originally encoded. So you could in fact have two files both namedomega Ω.txt, but the Ω encoded in two different ways. There is no reasonable way for syncthing to handle this situation, so it refuses to try.The "NFC" way is the standard way in Windows and what is produced if you type that key on your keyboard.calmh commentedon Jul 22, 2014
Actually no, you're entirely correct - syncthing does expect OHM SIGN (U+2126) to be normalized as GREEK CAPITAL LETTER OMEGA (U+03A9). http://www.fileformat.info/info/unicode/char/2126/index.htm lists that as the "decomposition", but I'm not 100% clear on whether that means OHM SIGN should not be present in UTF8-NFC, although it does also say "preferred representation is U+03A9". This might be a bug, or maybe we should at least be a little less strict. Some investigation required!
calmh commentedon Jul 22, 2014
Right, so as it stands, this is expected behavior (although I can see that it can be annoying).
Syncthing expects filenames to be in the standard encoding for the operating system and platform in question. On Windows that means UTF-8 NFC. We do this because we want to be able to translate the name correctly to whatever is expected on the target system, or it'll look like crap there and can potentially cause data loss. For example, here's what happens on my computer if I have a file called Ω (omega) and try to create one called Ω (ohm sign):
This happens because the Mac filesystem enforces normalized names, much like syncthing does. We do the same for names containing invalid characters (but on the receiving end, since what is considered invalid is very system dependent).
There won't be any song and dance with replacing characters; what if we rename the file Ω.txt to _.txt, but there already is a _.txt on the other system, etc...
In this specific case, apparently, consulting http://www.unicode.org/charts/normalization/ (search for 2126) the OHM SIGN should always be encoded as GREEK CAPITAL LETTER OMEGA (U+03A9), so that's what we expect.
endolith commentedon Jul 22, 2014
They're not the same character, but they are canonically equivalent. Yes, you can create two files named "Ω.txt" and "Ω.txt" in the same folder, on both Windows and Linux. In this case, since Dropbox normalizes them, it converts one filename to "Ω (Unicode Encoding Conflict).txt".
If the software isn't going to change anything automatically, it should at least point out which character is causing the problem and offer to fix it for you:
calmh commentedon Jul 22, 2014
Yep!
endolith commentedon Jul 22, 2014
It should be fine to convert "Ω.txt" (ohm) to "Ω.txt" (Omega), and if "Ω.txt" already exists, make it "Ω (2).txt" or something?
11 remaining items
lupa18 commentedon Nov 13, 2014
Yes, It works; but I did it manually. Is there any other way to do it ?
Merge pull request #1488 from calmh/utf8
mauro3 commentedon Mar 19, 2015
What does the automatic fix do to the filenames? Does it rename them to conform to the system standard on syncing? Presumably it does not rename files which are present locally, right?
calmh commentedon Mar 19, 2015
It renames files that are UTF8 but in the wrong normalization form for the current system, yes. This is something that pretty much only happens when files are moved on USB sticks and similar without conversion between PC and Mac, and when the filenames contain accented characters (or some other special cases).
Automatically fix file name normalization errors (fixes #430)