What encoding is used when I type a character?

2019-05-30 04:14发布

问题:

When I type e.g. a Spanish character (with the keyboard), what encoding is used to send that character to the application (e.g. notepad or Word)?

E.g. Does the keyboard send it as a Unicode character and the application convert it to its desired encoding (e.g. ANSI).

Does the default encoding of the OS play a role?

Windows and Linux please.