1) UTF-16 is not Unicode. Unicode is a combination of a character set (the Unicode character set, equivalent to the universal character set (UCS) of ISO-10046) and algorithms for comparing, sorting and casing that take into account the peculiarities of scripts and language from all over the world. UTF-16 and UTF-8 are encodings of the codepoints of this character sets into a byte stream. (More correctly, UTF-16 is an encoding to 16-bit units, and UTF-16LE and UTF-16BE define further serialization to byte streams.) Win32 programmers and the API docs are frighteningly careless in mixing up the two terms. It's as if UTF-16
was Unicode to Win32 programmers, which is stupid.
2) Given that Unicode attempts to cover all languages at the same time, doing anything Czech-specific in the conversion of UTF-16 to UTF-8 (which is just an encoding conversion) is an absurd idea. The conversion means going through the UTF-16 string, decoding the code points (1 16-bit unit for most characters, 2 for surrogate pairs), and encoding them as UTF-8 (between 1 and 4 bytes) into the target buffer. There is absolutely nothing language-specific about this.
3) CP_ACP uses the currently defined Ansi Code Page, as understood by the Win32 API. This code page is typically set to 437 (US) or 850 (Western European). By setting the language to Czech, you probably set the ACP to 851 (Eastern European). In any case, you won't get UTF-8.
More to the point, it's absolutely disallowed to set the ACP to UTF-8, even though it's apparently possible. However, many API functions are not able to handle multi-byte characters longer than 2 bytes, so they can't work with UTF-8. See
Michael Kaplan's multitude of
comments on the subject.
So to convert to UTF-8, you must pass CP_UTF8. The MSDN page
could have told you that, but apparently you are banned from MSDN, because otherwise you surely would have followed my advice and known that already.