1

I want to show unicode character on my windows console. For this I changed the cmd's font to lucida console and I'm using chcp 65001 before every session I will open a program which will display unicode characters. This only works to session where I ran chcp 65001. If an external program open the cmd instead of myself I can't control it and call chcp before. So I want run it automatically when a new cmd is run (and turn on/off as I want to). Is it possible?

Jack
  • 1,135
  • 5
  • 17
  • 29
  • what you ask for looks very similar to [this](http://stackoverflow.com/questions/14109024/how-to-make-unicode-charset-in-cmd-exe-by-default), but I could be wrong! – jjk_charles Aug 28 '14 at 18:34
  • It does what I'm looking for but on way I don't want to. As I've mentioned in the post some people did that but you windows system didn't start anymore after reboot. – Jack Aug 28 '14 at 18:44
  • oh yes, that link serves only half of your question. For the second part of your question, you could write a windows service to monitor if "cmd" is launched and call your desired program/application as soon as cmd is identified to be a running process. There might be a cleaner approach to it, but this is one of the options. – jjk_charles Aug 28 '14 at 19:21

1 Answers1

1

You could use Autorun key in the registry [to run chcp 65001 for each session]

There are two variables you could use (machine and user hives)
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun and/or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

Set Autorun (create it if it does not exists, type REG_SZ) to chcp 65001

wmz
  • 7,102
  • 1
  • 21
  • 32