cplusplus / nbballot

Handling of NB comments in response to ballots
14 stars 4 forks source link

NL375 D.19 [depr.fs.path.factory] Clarify that std::string is not good for UTF-8 LWG 3328 #371

Closed wg21bot closed 4 years ago

wg21bot commented 5 years ago

Example in deprecated section implies that std::string is the type to use for utf8 strings. [Example: A string is to be read from a database that is encoded in UTF-8, and used to create a directory using the native encoding for filenames: namespace fs = std::filesystem; std::string utf8_string = read_utf8_data(); fs::create_directory(fs::u8path(utf8_string));

Proposed change: Add clarification that std::string is the wrong type for utf8 strings

tahonermann commented 4 years ago

SG16 plans to discuss this comment Tuesday morning:

tahonermann commented 4 years ago

SG16 in Belfast: Recommend to accept with a modification to update the example in [depr.fs.path.factory]p4 to state that std::u8string should be preferred for UTF-8 data.

Rationale: The example code is representative of historic use of std::filesystem::u8path and should not be changed to use std::u8string. The recommended change is to a non-normative example and may therefore be considered editorial.

Removing the SG16 label. This now goes to LWG.

Minutes are available at:

JeffGarland commented 4 years ago

New LWG issue submitted to update wording.

Dani-Hub commented 4 years ago

The associated issue is LWG 3328

JeffGarland commented 4 years ago

Full group in Prague Monday afternoon. Consensus to prioritize issue as P0.

mclow commented 4 years ago

Accepted. LWG3328 will be moved on Saturday in Prague.