Dear Ruben,
My two cents,
Le Mon, Aug 03, 2026 at 11:18:23PM +0000, Ruben.Vanlus via Bug reports for the
GNU Bourne Again SHell a écrit :
> I can't agree with that... Today I started migrating internal company
> scripts...
> ... variable name (Σ=“<value>”) was rejected....
I alway considered using UTF as file, variable or function name is a bad idea.
I can't prevent my users to name her files using UTF8, but as I know inherent
problems with this, I don't use UTF-8 for programming!!
Let me show you a little sample (using bash associatives arrays):
So you use `Greek Capital Sigma' as variable name, but...
buildUtfSample() {
local tmpStr;
printf -v tmpStr '["%b"]=RANDOM ' \
\\U{3a3,1D{6BA,6f4,72e,768,7a2}}{,\\UFE0{E,F}}
declare -gAi utf8Sample="($tmpStr)"
}
buildUtfSample
for idx in "${!utf8Sample[@]}";do
printf ' \47%s\47=%s\n' "$idx" "${utf8Sample["$idx"]}"
done
Could produce something like:
'𝚺️'=17943
'𝚺︎'=13799
'𝝨'=23400
'Σ'=11963
'𝚺'=11151
'𝜮️'=5277
'𝜮︎'=19295
'𝝨︎'=164
'𝝨️'=28563
'𝞢️'=5186
'𝞢︎'=21189
'𝜮'=26356
'Σ️'=8321
'Σ︎'=1360
'𝛴︎'=19735
'𝛴️'=27787
'𝞢'=12034
'𝛴'=27951
... Then my question is: which one?
As I already said: Using UTF8 in code could
- improve ability to obsfuscate
- introduce new bugs
- then new exploits... CVE-2026-44288
... and so on...
--
Félix Hauri - <[email protected]> - http://www.f-hauri.ch