Boost logo

Boost :

Subject: Re: [boost] [nowide] request for clarification
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-06-16 21:44:06


>> It "fixes", which implies that otherwise the args are "broken". How are
>> args in function main() broken? (other than not being UTF-8)?
>
> That main(argc,argv) receives parameters converted from native UTF-8
> internal API to current locale's codepage - generally not being able
> to represent the all the required charset (since Windows does not
> support UTF-8 as native locale)

This is incorrect. You have been able to set the Windows console to
UTF-8 for many years. Just issue `chcp 65001`, your console is now in
UTF-8 and UTF-8 strings will present to argv.

Indeed it is possible to set UTF-8 consoles globally as the default, but
lots of stuff hard assumes Latin1 input and gets very upset if it sees
UTF-8. In particular, MSVCRT, though maybe the VS2015 rewrite of MSVCRT
has fixed that. I do remember .NET programs ran great with UTF-8 input
though, as do NT kernel programs. The blocker is MSVCRT.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk