Skip to content

Bug: cppwinrt does not support chinese path #1306

@HO-COOH

Description

@HO-COOH

Version

2.0.230225.1

Summary

As title suggest

Reproducible example

1. On a chinese version of windows, create a username that has Chinese characters.
2. Create a C++ UWP project, update cppwinrt nuget if necessary.
3. Compile.

Expected behavior

Compiles fine

Actual behavior

已启动生成...
1>------ 已启动生成: 项目: BlankApp1, 配置: Debug x64 ------
1>cppwinrt : error Path 'C:\Users\涓枃鐢ㄦ埛\source\repos\BlankApp1\x64\Debug\Merged\BlankApp1.winmd' is not a file or directory
1>C:\Users\中文用户\source\repos\BlankApp1\packages\Microsoft.Windows.CppWinRT.2.0.230225.1\build\native\Microsoft.Windows.CppWinRT.targets(848,9): error MSB3073: 命令“"C:\Users\中文用户\source\repos\BlankApp1\packages\Microsoft.Windows.CppWinRT.2.0.230225.1\build\native\..\..\bin\"cppwinrt @"x64\Debug\BlankApp1.vcxproj.cppwinrt_comp.rsp"”已退出,代码为 1。
1>已完成生成项目“BlankApp1.vcxproj”的操作 - 失败。
========== 生成: 0 成功,1 失败,0 最新,0 已跳过 ==========
========= 生成 开始于 11:40 AM,并花费了 00.643 秒 ==========

From this log, You can see cppwinrt.exe does not handle the path correctly, while msbuild.exe does

image

Additional comments

Windows 10 1809

Does NOT enable the beta UTF-8 support in language settings, because normal user won't have this enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions