Sample Header Ad - 728x90

MacOS 12.5 file names are created with wrong char

0 votes
0 answers
42 views
I made a script to rename mp3 files based on the tags, basically it extracts the data like this:
sArtist=$(exiftool -s3 -Artist "$sFile")
...
sNewName="$sArtist - $sTitle"
mv -v "${sFile}" "${sNewName}.${sFileExt}"
The problem is with the diacritics, for example in the artist name, the character á in the filename is saved as unicode aU+0301 while the expectation is that it should be saved as U+00E1 Any idea why? Here is the output of env:
$ env
TERM_PROGRAM=Apple_Terminal
TERM=xterm-256color
SHELL=/bin/zsh
TMPDIR=/var/folders/c5/38kntdc107jbxmc_8sg8_qfc0000gn/T/
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=BCFA74E2-4B36-447A-8DE8-4598EFB89474
USER=******
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.HuUuhLPn6d/Listeners
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
_=/usr/bin/env
__CFBundleIdentifier=com.apple.Terminal
PWD=/
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
HOME=/Users/******
SHLVL=2
LOGNAME=******
LC_CTYPE=UTF-8
DISPLAY=/private/tmp/com.apple.launchd.omquYUiZVj/org.macosforge.xquartz:0
Asked by goosseno (11 rep)
Aug 22, 2022, 10:33 AM