Created
December 3, 2020 15:43
-
-
Save tempelmann/be46dd818f9240fd548e6a20ed1576b8 to your computer and use it in GitHub Desktop.
Demonstrates an issue in SMB + macOS when having files with decomposed characters on a shared Linux volume
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script demonstrates an issue with SMB (and probably AFP as well) | |
# sharing, when accessing files by macOS that are hosted on a Linux share. | |
# | |
# Run this script on a Linux system to create two file in the current dir. | |
# Make sure it runs in bash, not sh, or the codes won't work. | |
# | |
# Make the generated files acessible via SMB, then try to access both files | |
# from macOS. The one called "decomposed_ü" won't be accessible - that's the bug. | |
# decomposed ü (u+¨): | |
ue_decomp=$'u\xCC\x88' | |
# precomposed ü: | |
ue_precomp=$'\xC3\xBC' | |
#echo $ue_decomp | |
#echo $ue_precomp | |
# create two files with the different compositions | |
echo "${ue_decomp} (decomposed)\c" > decomposed_${ue_decomp} | |
echo "${ue_precomp} (precomposed)\c" > precomposed_${ue_precomp} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment