Windows – How to add non-latin entries in hosts file

hostsunicodewindows

Is there a way to add non-latin entries in /etc/hosts on windows?

Something like

127.0.0.1   локалхост

Tried the code above and also punycode with no luck

Yes, i know that this would break almost any app and wouldn't pass any validation. I only need to pull this off for a single machine.

Best Answer

Scratch that, punycodes actually do work. This code

127.0.0.1 xn--80atccmdviy

works as expected, it's just that ping for some reason won't find host, probably due to cmd working in CP-1251 instead of UTF-8.

Related Topic