Alt Code in MS Word - different code but same character
ALT+0142 produces the character Ž
because 142 corresponds to this character in the Windows 1252 code page.
ALT+0381 also produces the character Ž
, because 381 is the decimal value of U+017D which correponds to this character in Unicode.
Alt codes with 4 digits produce the corresponding characters in the Windows 1252 code page.
Alt codes with up to 3 digits produce the corresponding characters in the Code page 437.
All code pages have only 256 characters (0 to 255), so any alt code larger than 255 would produce the corresponding Unicode character in Word.
However, this does not apply to Excel, which simply computes the modulo 256 value and produces that character (in code page 437 or 1252, depending if it has 3 or 4 digits). Note that 381-256=125, which corresponds to }
(in ASCII, therefore in all code pages).