> I expected
> 
> Document → Set Filetype → Scripting Languages → Shell script
> 
> to set encoding according to the Filetype intent.

It's unrelated, nothing prevents you from saving something you display as shell 
script in UTF-32 or anything else.  And actually, not only preventing that 
could prevent legitimate use case, but it'd also be terribly tricky, because 
there's a very large variety of encoding that offer enough similarities so that 
they work, yet some don't.  OK, UTF-16 and 32 have against them they obviously 
aren't ASCII-compatible, so anything that don't understand encoding but expect 
ASCII will not like it, but some odd 7 or 8 bit encodings are not ASCII 
compatible in ways that do or don't affect specific compilers, interpreters or 
other tools.  Bottom line is, encodings are complicated, and support for each 
en every one of them varies wildly depending on way too many parameters 
specific to a use case.  Yet usually, using BOM-less UTF-8 is pretty safe 
nowadays.  But sometimes another encoding might actually not be an error (as a 
matter of opinion though).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3423#issuecomment-1454900711
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/3423/[email protected]>

Reply via email to