Why isn't UTF-8 allowed as the "ANSI" code page?
        Posted  
        
            by dan04
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by dan04
        
        
        
        Published on 2010-06-08T06:04:48Z
        Indexed on 
            2010/06/08
            6:12 UTC
        
        
        Read the original article
        Hit count: 351
        
The Windows _setmbcp function allows any valid code page...
(except UTF-7 and UTF-8, which are not supported)
OK, not supporting UTF-7 makes sense: Characters have non-unique representations and that introduces complexity and security risks.
But why not UTF-8?
As I understand it, the "ANSI" versions of the Windows API functions convert their arguments to UTF-16, call the equivalent "W" function, and convert any strings in the output to "ANSI". This is what I've been doing manually. So why can't Windows do it for me?
© Stack Overflow or respective owner