{"id":111856,"date":"2025-12-10T07:00:00","date_gmt":"2025-12-10T15:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=111856"},"modified":"2025-12-10T08:44:57","modified_gmt":"2025-12-10T16:44:57","slug":"20251210-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20251210-00\/?p=111856","title":{"rendered":"How does Windows synthesize the <CODE>CF_<WBR>LOCALE<\/CODE> clipboard format?"},"content":{"rendered":"<p>Last time, we finished with a nice table of <a title=\"How does Windows synthesize CF_UNICODETEXT from CF_TEXT and vice versa?\" href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20251209-00\/?p=111854\"> now Windows synthesizes each of the three text clipboard formats from the other two<\/a>. We saw that the <code>CF_<wbr \/>LOCALE<\/code> clipboard format plays an important role in the conversion. But when most people set text on the clipboard, they don&#8217;t specify an explicit <code>CF_<wbr \/>LOCALE<\/code> format. What happens in that case?<\/p>\n<p>If the code that puts the initial text on the clipboard does not specify an explicit <code>CF_<wbr \/>LOCALE<\/code>, then the system synthesizes one by using the LCID associated with the user&#8217;s current keyboard layout. This is what 16-bit Windows did, and 32-bit Windows carried this policy forward for backward compatibility.<\/p>\n<p>This means that if you typed the text with the US-International keyboard, then the system will use the US-English LCID as the <code>CF_<wbr \/>LOCALE<\/code>, and it will therefore use 1252 as the ANSI code page and 437 as the OEM code page.<\/p>\n<p>You might say, &#8220;But that makes no sense, does it? Suppose I highlight some text in Hebrew and copy it to the clipboard. Shouldn&#8217;t that be set with a Hebrew LCID?&#8221;<\/p>\n<p>Should it?<\/p>\n<p>We&#8217;ll start studying all the multi-locale issues next time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Getting it from a place that might have been obvious in the past, but maybe not today.<\/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-111856","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Getting it from a place that might have been obvious in the past, but maybe not today.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/111856","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=111856"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/111856\/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=111856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=111856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=111856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}