Skip to content

Fix 'UTF-8 config filenames not supported on Windows' #912 - #1273

Merged
phlptp merged 2 commits into
mainfrom
unknown repository
Dec 27, 2025
Merged

phlptp merged 2 commits into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Dec 25, 2025

Copy link
Copy Markdown

This PR should fix #912

@phlptp

phlptp commented Dec 25, 2025

Copy link
Copy Markdown
Collaborator

We are either going to have to put the change inside a conditional compilation block or define to_path as an empty operation for compilations without <filesystem>

@ghost

ghost commented Dec 25, 2025 •

Copy link
Copy Markdown
Author

I've added a conditional compilation block. I think the fix should cover many users. However, since the --config path is stored as a std::string, it must be encoded in UTF-8. I assume that, even on older C++ standards, the to_path function on Windows should convert from UTF-8 to the current locale or directly to UTF-16 (the overload for the std::ifstream constructor that takes a wide string is non-standard though.)

@phlptp

phlptp commented Dec 26, 2025

Copy link
Copy Markdown
Collaborator

@all-contributors add @The0Dev for code

@allcontributors

Copy link
Copy Markdown
Contributor

@phlptp

I've put up a pull request to add @The0Dev! 🎉

@codecov

codecov Bot commented Dec 26, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e4ee3af) to head (2e1d09e).
⚠️ Report is 158 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #1273     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files           17        19      +2     
  Lines         4546      5050    +504     
  Branches         0      1080   +1080     
===========================================
+ Hits          4546      5050    +504     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@phlptp
phlptp merged commit f81db4e into CLIUtils:main Dec 27, 2025
phlptp pushed a commit that referenced this pull request Dec 27, 2025
Adds @The0Dev as a contributor for code.

This was requested by phlptp [in this
comment](#1273 (comment))

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UTF8/Unicode config filename not supported on Windows

1 participant