[GH-ISSUE #12563] wstring_convert is deprecated in C++17, and will be removed in C++26 #70393

Closed
opened 2026-05-04 21:23:53 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @clin1234 on GitHub (Oct 10, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12563

In the Windows-specific part of fs_create_directory_with_parents, std::wstring_convert and std::codecvt_utf8 has been deprecated starting in C++17, the latter because of https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2871r3.pdf, and the former because all standard facets that the function could use will be removed in C++26.

I've come across https://github.com/nemtrif/utfcpp, a header-only library to handle UTF conversions. Worth considering?

Originally created by @clin1234 on GitHub (Oct 10, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12563 In [the Windows-specific part of `fs_create_directory_with_parents`](https://github.com/ollama/ollama/blob/main/llama/llama.cpp/common/common.cpp#L783-L824), `std::wstring_convert` and `std::codecvt_utf8` has been deprecated starting in C++17, the latter because of https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2871r3.pdf, and the former because all standard facets that the function could use will be removed in C++26. I've come across https://github.com/nemtrif/utfcpp, a header-only library to handle UTF conversions. Worth considering?
Author
Owner

@jessegross commented on GitHub (Oct 10, 2025):

This is part of the old llama engine which comes from llama.cpp, so I recommend that you submit a change to the upstream project and we will pull it at the next vendor sync.

<!-- gh-comment-id:3392521327 --> @jessegross commented on GitHub (Oct 10, 2025): This is part of the old llama engine which comes from llama.cpp, so I recommend that you submit a change to the upstream project and we will pull it at the next vendor sync.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#70393