Edit2: Solved! Thank you all! 🥰 I was supposed to put quotation marks around the command argument variable/substitute within the script, as in scanimage -d [device] –format=png -p -o “$1”

Edit: turns out it’s not the accented character, but the whitespace character in front of július.png, since the script doesn’t accept julius.png either.

#!/bin/bash  
# name of the script is SCAN.bash  
scanimage -d [device] --format=png -p -o $1  

I have tried ’ ', " " and to escape it with \

./SCAN 'anyu 1988 július.png'  
./SCAN "anyu 1988 július.png"  
./SCAN anyu\ 1988\ július.png  

But it throws argument without option. It works fine if I type it out instead of scripting.

The target language is Hungarian and I have generated the necessary locale.