Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1060

How can I make System.Environment.GetEnvironmentVariable("USERNAME") UTF-8 compatible when my username is non ascii?

$
0
0

In my C# Windows application, I am fetching the username from System.Environment.GetEnvironmentVariable("USERNAME") whereas my system account is non ascii, so while I debug I was getting username as "????", the name getting altered.

In windows, I tried enabling beta utf8 Unicode. It worked with that, but it is a global setting and not only for my application. I don't want that, how can I make the GetEnvironmentVariable("USERNAME") UTF8 compatible?


Viewing all articles
Browse latest Browse all 1060

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>