Is it possible to set "locale" of a Windows application to UTF-8?

2

1

We know there is an application called AppLocale, which can change the code page of non-Unicode applications, to solve text display problems.

But there is a program whose right display code page is UTF-8, which means its text should be shown as UTF-8, but instead Windows displays it as the native code page and makes the text unreadable. It seems funny, because there are almost all countries and regions, but without UTF-8. I think it is a bug, because the programmers may use English and ignore testing non-English text display issues. I don't think the producer will fix it and I wanna fix it myself.

Is it possible to set non-Unicode output as UTF-8 by using software like AppLocale? Default non-Unicode output is native code page? How can I set the native code page to UTF-8?

Komeiji Kuroko

Posted 2016-01-29T15:23:52.823

Reputation: 61

I've fixed most grammar issues for you but there is almost include all countries and regions, but without UTF-8 is impossible to understand – phuclv – 2019-06-22T16:08:50.720

Answers

1

Previously it was not possible because

Microsoft claimed a UTF-8 locale might break some functions (a possible example is _mbsrev) as they were written to assume multibyte encodings used no more than 2 bytes per character, thus until now code pages with more bytes such as GB 18030 (cp54936) and UTF-8 could not be set as the locale.

https://en.wikipedia.org/wiki/Unicode_in_Microsoft_Windows#UTF-8

However there's a "Beta: Use Unicode UTF-8 for worldwide language support" checkbox since Windows 10 insider build 17035 for setting the locale code page to UTF-8

Beta: Use Unicode UTF-8 for worldwide language support

See also

That said, the support is still buggy at this point

phuclv

Posted 2016-01-29T15:23:52.823

Reputation: 14 930

0

From what I read about Microsoft AppLocale tool on Wikipedia, the tool can NOT change your code page to UTF-8. It only works with Non-Unicode applications, but UTF-8 is part of Unicode standard.

Under the hood, Unicode processing of non-ASCII characters greatly differs from non-Unicode one, so while it is possible to change between non-Unicode code pages (this is what AppLocale does) it is NOT possible to change between Unicode and non-Unicode without modification of the application made by its producer.

miroxlav

Posted 2016-01-29T15:23:52.823

Reputation: 9 376

I know AppLocale can't work with Non-Unicode applications. But I don't think it need to convert encode. Only thing to do is to let the text content show correctly. The binary data is already correct UTF-8 text. For example, if you printf() a char array which content every byte of a UTF-8 text, and it will show as native encode (like iso-8859-1). If let the default encode be UTF-8, then problem solved. – Komeiji Kuroko – 2016-01-30T13:05:04.417

@KomeijiKuroko – please, if you wish, could you illustrate what you mean in your recent comment on some specific UTF-8 example? – miroxlav – 2016-02-20T15:22:59.130

-1

Just to mention it here: In Windows 10 17133 there is now a beta option to use UTF-8 for worldwide support. But it does not help with non-Unicode programs for me as of now, but it is placed on the pop-up where I can change the locale for non-Unicode programs.

So, maybe they are working on something to end the necessity of having to change the locale for non-Unicode programs.

anthropos

Posted 2016-01-29T15:23:52.823

Reputation: 1

Is there some source, link, goto? – petermeissner – 2019-05-24T08:26:58.853

What? It is not clear what you are trying to say in this answer. You should consider perhaps clarifying it. – Ramhound – 2019-06-22T16:40:00.727

I remember seeing this in a news feed somewhere before I saw this question so while I don't have a link either I believe it's true. – hippietrail – 2019-06-23T15:10:29.130