3 ms·
Linux and MacOS use UTF-8. Qt, Windows itself, Java, Javascript, and (on Windows) C# will all use UTF-16. Most computers run Windows, by a rather big margin. E
by jeroenhd 3y ago
Linux and MacOS use UTF-8. Qt, Windows itself, Java, Javascript, and (on Windows) C# will all use UTF-16.
Most computers run Windows, by a rather big margin. Even more computers use Javascript. Are you running KDE? Don't be surprised if half the text in your screen is secretly UTF-16!
UTF-8 is definitely better, but if you're on Windows, you're making your own life harder by using UTF-8. Microsoft is migrating APIs to UTF-8 but it'll take years before that's finished. Just look at all the conversion code you need according to the page you linked.
Now, if you're writing a cross platform library, you'll have to decide what encoding(s) you use. I personally don't really see why you wouldn't make your library encoding agnostic, but if you want to stick to one single encoding, you'll have to decide.
If you're writing a program for Windows, technical superiority is a mediocre argument for making your own life that much harder. There are tons of formats and design decisions that may be technologically superior, but just end up wasting programmers' time, and this is one of them.