A file called café.txt can be written two ways. Linux and Windows usually save the é as one character (NFC, bytes 63 61 66 c3 a9). A Mac can hand a program the decomposed form: an e followed by a combining accent (NFD, bytes 63 61 66 65 cc 81). On screen they are identical. To an object store that keeps keys as plain bytes, they are two different objects.
So what happens when the Mac and the Linux server both back up to the same bucket? We uploaded the same six names in both spellings through four clients (boto3, AWS CLI, rclone and s3cmd) to tport.space and to a reference server that keeps keys byte for byte, then listed, synced and downloaded them. We also measured the key length limit and the characters that fail.
What the rules say, and what we tested
- AWS: a key is a sequence of Unicode characters in UTF-8, at most 1,024 bytes, listed in order of their UTF-8 bytes (Naming Amazon S3 objects). Nothing in it mentions normalising NFC and NFD.
- Our run, 2026-11-16: boto3 1.44.3, AWS CLI 1.46.3, rclone 1.76.0, s3cmd 2.4.0 on macOS (APFS). Six names: café, señor, Ångström, ガイド, 한글 and ñandú, each .txt.
- Reference: moto 5.2.5 running on the same Mac, a stand-in that keeps keys exactly as sent. It is not AWS; it shows what a byte-exact store does with the same requests.
- Files for the sync tests had the same modification time in both folders (2026-01-01), so a re-upload means the name changed, not the file.
Result 1: tport.space treats the two spellings as one key
We put café.txt in NFC, then in NFD, into the same prefix and listed it. Then the other way round. There was always one object, and the listing showed the spelling of the last write.
| Step on tport.space | Objects listed | Key in the listing |
|---|---|---|
| PUT NFC (9 bytes) | 1 | NFC, 9 bytes |
| then PUT NFD (10 bytes) | 1 | NFD, 10 bytes |
| PUT NFD first, then NFC | 1 | NFC, 9 bytes |
| HEAD with either spelling | both found | same object |
| DELETE with the NFC spelling | 0 left | the NFD one went too |
With five names written in both forms, boto3 listed 5 objects, not 10. A byte-exact store lists 10. For a backup that is good news: the Mac and the Linux box cannot create look-alike duplicates. The cost is that the second write replaces the first.
Result 2: what each client does when both machines sync
We synced the NFC folder, then the NFD folder, to one prefix, then switched back and forth. Control rows repeat the same folder to show a correct no-op.
| Client | Objects after NFC then NFD (tport.space) | Same on the byte-exact reference | Uploads when the spelling switches (tport.space) | Uploads on a repeat of the same folder |
|---|---|---|---|---|
| aws s3 sync | 6 | 12 | 6 of 6 | 0 for NFC, 3 for NFD (see below) |
| s3cmd sync | 6 | 12 | 6 of 6 | 0 |
| rclone sync | 6 | 6 | 0 of 6 | 0 |
- aws s3 sync and s3cmd compare the local name with the listed key as strings. On the reference that gives 12 objects, six names twice. On tport.space the spellings collapse, but each switch of machine looks like six changed files, so the other machine re-uploads all six on its next run and the two keep taking turns.
- rclone normalises names to NFC before comparing (see
rclone help flags:--no-unicode-normalizationturns it off). Both folders map to the same six keys, and it uploaded nothing on the switch. On the reference too it kept 6 objects, all NFC. It is the only client of the four that never produced duplicates.
Result 3: twelve objects, six files on a Mac
Downloading the reference's 12 objects with aws s3 sync to an APFS folder ran 12 downloads and left 6 files: APFS keeps the spelling you give it but treats NFC and NFD as the same name, so the second download of each pair overwrote the first. The Mac cannot even hold both. On tport.space there were 6 objects and 6 files, as expected.
Result 4: listing order follows the normalised key
AWS lists keys by their UTF-8 bytes. On tport.space the order followed the NFC form of the key even when the stored spelling was NFD: éclair, written last in NFD (8 bytes against 7 composed), still sorted after zebra, where its NFC form belongs, instead of between eclair and zebra where its own bytes would put it.
| Local folder, sorted by file-name bytes | Order |
|---|---|
| NFC folder | café, señor, Ångström, ñandú, ガイド, 한글 |
| NFD folder | Ångström, café, ñandú, señor, 한글, ガイド |
None of the 6 names has the same position in both orders. aws s3 sync walks the local list and the bucket list side by side, which assumes one shared order. That fits what we saw: after the NFD folder had been synced, a second run of the same NFD folder still uploaded 3 of 6 files (Ångström, ñandú and 한글, per the log), while the second run of the NFC folder uploaded none. We did not read the client's code, so treat the order mismatch as the likely cause, not a proven one. The fix is the same as for duplicates: use one spelling everywhere.
Result 5: the key length limit is in bytes, and it is lower here
AWS documents 1,024 bytes. We found the longest accepted key on tport.space by bisecting with a repeated unit:
| Repeated character | Bytes each | Longest key accepted | Bytes | Characters |
|---|---|---|---|---|
| a | 1 | 1011 x a | 1011 | 1011 |
| é, NFC | 2 | 505 | 1010 | 505 |
| é, NFD (e + accent) | 3 | 337 | 1011 | 674 |
| 中 | 3 | 337 | 1011 | 337 |
| 🎉 | 4 | 252 | 1008 | 252 |
Every case stopped at 1,008 to 1,011 bytes, a few bytes under 1,024, with InvalidObjectName beyond. The cause is not something a client can read, so keep keys under 1,000 bytes. The practical trap is the decomposed form: the same 340 accented letters are 680 bytes composed and 1,020 decomposed, and the second one is refused. A reference server with no limit accepted 1,543-byte keys, which is why a long Mac file name can work in testing and fail in production.
Result 6: awkward characters
We did a put, head, listing, presigned GET and delete for 20 awkward keys. Nineteen worked on tport.space in every step: space, +, %20, %2B, &, =, ?, #, tab, newline, double slash, leading slash, trailing space, asterisk, backslash, non-breaking space, an emoji, a family emoji built with zero-width joiners, Hebrew and a control character (U+0001). The one that failed was a dot segment.
| Key | tport.space | Why it matters |
|---|---|---|
| dir/../x.txt, a/./b.txt, up/.., .. | PUT refused: SignatureDoesNotMatch (all four) | The request path is cleaned before the signature check; AWS also warns about period-only segments. a..b.txt works. |
| a\x01b.txt (control character) | Stored and listed | Listing without encoding-type=url returned XML with a raw U+0001 and boto3 failed on the whole page; with encoding-type=url (boto3's default) keys come back percent-encoded and the listing worked. |
| a%20b.txt | Stored as typed | A client that encodes twice asks for another key. |
What to do
- Normalise to NFC before upload and in every sync job. rclone does it for you; for the others, normalise the names or use the check below.
- Keep keys under 1,000 bytes, counted after normalising and after adding the prefix.
- Avoid dot segments and control characters in keys. Keep encoding-type=url on in any listing code you write.
- Do not rely on a store treating the spellings as one key: on a byte-exact service the same job makes duplicates.
Paste any name into our <a href="https://tport.space/tools/key-checker">S3 key checker</a>: it shows the bytes, the Unicode form, the encoded path and these warnings, in your browser. For related tests see <a href="https://tport.space/articles/object-storage-key-design-prefixes">designing keys that stay searchable</a> and <a href="https://tport.space/articles/content-disposition-download-filename-spaces-accents-japanese-curl-wget-browsers">what download filenames clients save</a>.
S3-compatible buckets with no egress fees: one endpoint for boto3, the AWS CLI, rclone and s3cmd.
Explore tport.spaceTest record and sources
- Run on 2026-11-16 against s3.tport.space with a private test bucket and a key limited to it; the bucket and key were removed afterwards. Clients: boto3 1.44.3, AWS CLI 1.46.3, rclone 1.76.0, s3cmd 2.4.0, macOS on APFS. Path-style addressing everywhere.
- Results are for tport.space on that date; we did not test AWS S3 itself, only read its documentation.
- Source: AWS, Naming Amazon S3 objects (UTF-8 keys, 1,024 bytes, sort order, characters to avoid, period-only segments).
- Unicode normalisation forms: Unicode Standard Annex #15.