As you have already discovered, the characters resulting from character codes between 0
and 255
depend entirely on the encoding that is used.
Windows doesn't use neither extended ASCII nor ANSI (usually Windows-1252); it actually depends on the application.
For example, Alt + (2, 2, 4) gives on my machine:
α
in Notepad and on the command prompt.
à
in Google Chrome's omnibox, but α
in its console and this very text area.
In Notepad++, a
with ANSI, α
with UTF-8.
For a more consistent behavior, just use Unicode character codes:
The key combination Alt + (9, 4, 5) – or Alt + (+, 3, B, 1) if you set the registry key HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad
to 1
– should result in a α
in every application that supports that character.
Sadly, that isn't the case:
The decimal char code results in ▒
in IE's address bar, while the hexadecimal one just beeps.
The decimal char code results in ▒
in Notepad++ with ANSI and ¦
with UTF-8.
The hexadecimal char code results in a
in Notepad++ with ANSI and α
with UTF-8.
Summary
Set HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad
to 1
.
Use Alt + (9, 4, 5) or Alt + (+, 3, B, 1) in applications with full Unicode support.
Fall back to trial and error in applications that lack full Unicode support.
Do you want to type in greek? – soandos – 2012-07-15T04:07:35.530
I'm using windows and I get α. – cutrightjm – 2012-07-15T04:09:02.110
Are you using WIN7? I might have been different on vista or xp. – irikkkkk – 2012-07-15T04:13:35.600
@irikkkkk, what OS are you using? – soandos – 2012-07-15T04:41:20.870
@soandros, windows 7 – irikkkkk – 2012-07-15T04:46:08.213