0

how can I generate ascii characters like Alt+0142 in command? I'm thinking that the only way to do that would be to have a file that includes all the characters and then somehow search for the character you're looking for

Supercreature
  • 441
  • 6
  • 25
  • Is there a particular code you're having issues with? Why not just use an existing reference for character encoding? Wikipedia has them for popular schemes like [UTF-8](http://en.wikipedia.org/wiki/UTF-8#Codepage_layout). – charles May 13 '15 at 17:28
  • What do you mean by "generate", what exactly do you want to do? And @charles the Windows console doesn't use UTF-8, it doesn't even use the default code page e.g. [1252](http://en.wikipedia.org/wiki/Windows-1252) but a special "OEM" code page such as [437](http://en.wikipedia.org/wiki/Code_page_437) for legacy reasons. – Mark Ransom May 13 '15 at 18:05
  • @MarkRansom, the question title was ASCII/Unicode characters in Cmd.exe. If all OP needed was a list of them then it would've be sufficient to just copy them. UTF-8 was just an example. – charles May 13 '15 at 19:54
  • cmd.exe does use code page 437 by default (at least in English versions of Windows), but it still supports Unicode under the right circumstances, as long as your selected font is one of the TrueType fonts. I was able to run `echo ʊɳı℅∂ə` successfully with the font set to Consolas (Lucida Console does not include glyphs for all the characters, so some appear as boxes, but they are still the correct characters). [This answer](http://stackoverflow.com/a/17177904/4896941) is a very detailed treatise on character encoding support in cmd.exe. – Lithis May 15 '15 at 15:57

1 Answers1

2

By character Alt+0142, do you mean "Ž"? To type this character in Windows, hold down the right Alt key and type 0142 on the numeric keypad. This works in cmd.exe the same as it works in any other program.

This can be a little tricky on laptop keyboards, but I was able to type it by holding down both the right Alt key and the Fn key while typing 0142 on the laptop's numeric keypad, which is overlaid on the right side of the letter keys on the laptop I am using currently.

Lithis
  • 1,327
  • 8
  • 14