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

调用std::locale(".utf8")时程序崩溃 #60

Closed
stsm85 opened this issue Jan 29, 2024 · 1 comment
Closed

调用std::locale(".utf8")时程序崩溃 #60

stsm85 opened this issue Jan 29, 2024 · 1 comment
Labels
类型:问题(Bug) Something isn't working 处置:不予处理(wontfix) This will not be worked on

Comments

@stsm85
Copy link

stsm85 commented Jan 29, 2024

auto loc = std::locale(".utf8");

使用vc-ltl编译,运行报错,不使用就不会报错

@mingkuang-Chuyu mingkuang-Chuyu added 类型:问题(Bug) Something isn't working 处置:不予处理(wontfix) This will not be worked on labels Feb 12, 2024
@mingkuang-Chuyu
Copy link
Collaborator

你好,这是设计如此。因为msvcrt.dll内部代码就不支持 UTF8的区域。

如果必须依赖此功能,那么建议在VC-LTL中开启UCRT模式。也可以不使用VC-LTL,直接使用微软原版。

注意:这将导致VC-LTL编译的程序依赖ucrt运行时。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
类型:问题(Bug) Something isn't working 处置:不予处理(wontfix) This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants