Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wg21bot opened this issue Oct 25, 2019 · 6 comments · Fixed by cplusplus/draft#3749
Labels
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 25, 2019

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

@wg21bot wg21bot added LWG Library SG16 Unicode labels Oct 25, 2019
@tahonermann
Copy link
Collaborator

SG16 plans to discuss this comment Tuesday morning:

@tahonermann
Copy link
Collaborator

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:

@tahonermann tahonermann removed the SG16 Unicode label Nov 5, 2019
@JeffGarland
Copy link
Member

New LWG issue submitted to update wording.

@Dani-Hub
Copy link
Member

Dani-Hub commented Nov 7, 2019

The associated issue is LWG 3328

@JeffGarland
Copy link
Member

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

@jensmaurer jensmaurer changed the title NL375 D.19 [depr.fs.path.factory] Clarify that std::string is not good for UTF-8 NL375 D.19 [depr.fs.path.factory] Clarify that std::string is not good for UTF-8 LWG 3328 Feb 11, 2020
@mclow
Copy link

mclow commented Feb 12, 2020

Accepted. LWG3328 will be moved on Saturday in Prague.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants