3 ms·
> I think it's totally reasonable for a program designed in 2024 to say it only supports ASCII and UTF-8 encodings. I think that it should depends on the progr
by zzo38computer 2y ago
> I think it's totally reasonable for a program designed in 2024 to say it only supports ASCII and UTF-8 encodings.
I think that it should depends on the program; that might be reasonable for some programs but in a lot of cases I think that it won't be reasonable. (Your explanation includes some of the examples, although not all of them.)
Sometimes, it is most helpful to support only ASCII (although non-ASCII bytes might still be supported, even without needing special processing to handle them; in some cases this may effectively allow other ASCII-compatible encodings as well such as EUC-JP).
Sometimes, a program should not need to deal with character encoding at all.
Sometimes, it makes sense to deal with whatever character encodings are used in the file formats the program is designed to handle.
Sometimes, it makes sense to support multiple character encodings, with or without conversion (depending on what is being done with them).
Even if a program does only support ASCII and UTF-8 encodings, then depending on what it does with them, mentioning ASCII might be unnecessary since UTF-8 is a superset of ASCII anyways.
But unfortunately many programs use UTF-8 (or other encodings, but mostly UTF-8) where it is inappropriate to do so, which can result in many problems including inefficiency.