{"id":21943,"date":"2008-06-16T10:00:00","date_gmt":"2008-06-16T10:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2008\/06\/16\/how-do-the-common-controls-convert-between-ansi-and-unicode\/"},"modified":"2008-06-16T10:00:00","modified_gmt":"2008-06-16T10:00:00","slug":"how-do-the-common-controls-convert-between-ansi-and-unicode","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20080616-00\/?p=21943","title":{"rendered":"How do the common controls convert between ANSI and Unicode?"},"content":{"rendered":"<p>Commenter Chris Becke asks <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/pages\/407234.aspx#513761\"> how the common controls convert ANSI parameters to Unicode<\/a>, since the common controls are Unicode internally.\n Everything goes through <code>CP_ACP<\/code>, pretty much by definition. The ANSI code page is <code>CP_ACP<\/code>. That&#8217;s what ACP stands for, after all.\n Now, there are some function families that do not use ANSI. The console subsystem, for example, prefers the OEM character set for its 8-bit strings, and file system functions can go either way, based on the setting controlled by the <code>SetFileAPIsToANSI<\/code> and <code>SetFileAPIsToOEM<\/code> functions.<\/p>\n<p> In the scenario Chris describes, I suspect that the problem is not the ANSI-to-Unicode conversion but rather that the font selected into the listview didn&#8217;t support the necessary characters. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Commenter Chris Becke asks how the common controls convert ANSI parameters to Unicode, since the common controls are Unicode internally. Everything goes through CP_ACP, pretty much by definition. The ANSI code page is CP_ACP. That&#8217;s what ACP stands for, after all. Now, there are some function families that do not use ANSI. The console subsystem, [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-21943","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Commenter Chris Becke asks how the common controls convert ANSI parameters to Unicode, since the common controls are Unicode internally. Everything goes through CP_ACP, pretty much by definition. The ANSI code page is CP_ACP. That&#8217;s what ACP stands for, after all. Now, there are some function families that do not use ANSI. The console subsystem, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/21943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=21943"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/21943\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=21943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=21943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=21943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}