Urgent.News

What's breaking now, across hundreds of outlets.

Tech

When do two Korean filenames in a ZIP become one after NFC normalization?

A ZIP from a supplier contains two files with names that look identical. Before deleting one or normalizing both names, check whether their full archive paths would match after normalization . Two entries in the same folder converged on one name in our test. The same pair in different folders did not. 01 · Why does one name take 19 bytes or 37 bytes? The Korean part of 거래명세서.txt can be…

When two Korean filenames within a ZIP archive appear identical, normalization can cause them to converge into a single name. To determine whether their full archive paths will match after normalization, one must check the paths before deleting or normalizing the names. In the provided test, two entries in the same folder converged on one NFC name, whereas the same pair in different folders remained distinct.

This discrepancy arises because Unicode normalization converts text to a consistent representation, with NFC using precomposed syllables and NFD using decomposed jamo. Both forms display equivalently, even if software compares different strings. The filename lengths in UTF-8 bytes vary between 19 and 37 bytes, depending on whether NFC or NFD is applied.

Applying NFC to both filenames yields the same string, demonstrating that the counts represent filename lengths, not ZIP sizes. By comparing files within the same folder versus different folders, it was found that NFC introduces a collision when entries share a folder, but not when they reside in separate folders. This observation was confirmed by scanning synthetic ZIP files created with Python 3.12.14.

The scan revealed that NFC alone does not introduce collisions. Keeping a copy of the work archive and inspecting groups with multiple entries before renaming is advised.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Password Recovery Links Versus One Time Codes Across 2 Devices

Imagine the page: password recovery completion has fallen below the media site's SLO, while the on-call dashboard still shows recovery requests being accepted.

  • Password recovery can be done via link or one-time code on two devices
  • Both methods require temporary, single-use credentials for security
  • Recovery process should be treated as acceptance criterion, not default

GPU Cluster Troubleshooting Guide for 2027: Isolating Originating Ranks in NCCL Timeouts and NVIDIA Xid Faults

Quick Answer: Never restart a crashed multi-node GPU job solely from a rank 0 NCCL watchdog timeout traceback. In synchronous distributed training, healthy victim ranks emit collective timeouts…

  • Inspect system logs for NVRM: Xid, OOM-killer, PCIe, Infiniband, and Mlx5 errors
  • Compare collective progression between ranks using PyTorch's Flight Recorder
  • Follow Denpex Distributed Training Hang Triage Guide if hardware logs are clean

More from Wednesday 25 November →