Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> whatever imagined problem is solved by marking clipboard text with some magical locale indicator is surely not as important as being able to interop literally just unicode characters between programs without having to read a 2-part blog post

Unicode-enabled Win32 applications can already do this as described in the article, the program pasting to the clipboard adds CF_UNICODETEXT format, and the program reading from the clipboard checks if CF_UNICODETEXT is available and prefers it over CF_TEXT.

The CF_LOCALE is used by the system to convert[1] CF_TEXT to CF_UNICODETEXT, so a Unicode-enabled application can get the right contents from a non-Unicode-enabled application.

[1]: https://learn.microsoft.com/en-us/windows/win32/dataxchg/sta...





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: