{"id":734,"date":"2021-11-28T15:31:21","date_gmt":"2021-11-28T07:31:21","guid":{"rendered":"https:\/\/carlos.aboutmy.info\/blog\/?p=734"},"modified":"2021-11-28T18:44:35","modified_gmt":"2021-11-28T10:44:35","slug":"use-unicode-utf-8-for-worldwide-language-support","status":"publish","type":"post","link":"https:\/\/carlos.aboutmy.info\/blog\/?p=734","title":{"rendered":"Use Unicode UTF-8 for worldwide language support"},"content":{"rendered":"\n<p> Windows NT can date back to 1993, at that time Unicode was still a new thing to the industry. Microsoft had decided to use UCS-2 (pre-W2K) and UTF-16 LE (since W2K) for supporting Unicode and introduced a separated set of Windows APIs (-W APIs) for 2-byte wide char, while keeping the (-A APIs) for Windows 9x programs compatibility. <\/p>\n\n\n\n<p>In contrast, Linux and other modern Unix-like systems use UTF-8 for Unicode support, hence, existing APIs which use 1-byte char can handle both ANSI and Unicode. <\/p>\n\n\n\n<p>This is quite annoying for Windows developers, always have to use MultiByteToWideChar and WideCharToMultiByte to convert between UTF-8, UTF-16 (WCHAR) and other code pages. Now, Microsoft clearly wants to end this by allowing UTF-8 in &#8220;ANSI Code Page&#8221; (65001), effectively support Unicode in their -A APIs. <\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>Until recently, Windows has emphasized &#8220;Unicode&#8221; -W variants over -A  APIs. However, recent releases have used the ANSI code page and -A APIs  as a means to introduce UTF-8 support to apps. If the ANSI code page is  configured for UTF-8, -A APIs operate in UTF-8. This model has the  benefit of supporting existing code built with -A APIs without any code  changes. <\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"440\" height=\"233\" src=\"https:\/\/carlos.aboutmy.info\/blog_uploads\/2021\/11\/Use-Unicode-UTF-8-for-worldwide-language.png\" alt=\"\" class=\"wp-image-735\" srcset=\"https:\/\/carlos.aboutmy.info\/blog_uploads\/2021\/11\/Use-Unicode-UTF-8-for-worldwide-language.png 440w, https:\/\/carlos.aboutmy.info\/blog_uploads\/2021\/11\/Use-Unicode-UTF-8-for-worldwide-language-300x159.png 300w, https:\/\/carlos.aboutmy.info\/blog_uploads\/2021\/11\/Use-Unicode-UTF-8-for-worldwide-language-380x200.png 380w\" sizes=\"(max-width: 440px) 100vw, 440px\" \/><\/figure>\n\n\n\n<p>References: <br><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/apps\/design\/globalizing\/use-utf8-code-page\">https:\/\/docs.microsoft.com\/en-us\/windows\/apps\/design\/globalizing\/use-utf8-code-page<\/a><br><a href=\"https:\/\/unicodebook.readthedocs.io\/operating_systems.html\">https:\/\/unicodebook.readthedocs.io\/operating_systems.html<\/a><br><a href=\"https:\/\/en.wikipedia.org\/wiki\/Unicode_in_Microsoft_Windows\">https:\/\/en.wikipedia.org\/wiki\/Unicode_in_Microsoft_Windows<\/a><br><a href=\"https:\/\/en.wikipedia.org\/wiki\/Windows_code_page\">https:\/\/en.wikipedia.org\/wiki\/Windows_code_page<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows NT can date back to 1993, at that time Unicode was still a new thing to the industry. Microsoft had decided to use UCS-2 (pre-W2K) and UTF-16 LE (since W2K) for supporting Unicode and introduced a separated set of Windows APIs (-W APIs) for 2-byte wide char, while keeping the (-A APIs) for Windows\u2026 <span class=\"read-more\"><a href=\"https:\/\/carlos.aboutmy.info\/blog\/?p=734\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[33],"tags":[],"_links":{"self":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/734"}],"collection":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=734"}],"version-history":[{"count":6,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/734\/revisions"}],"predecessor-version":[{"id":742,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/734\/revisions\/742"}],"wp:attachment":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}