-
-
Notifications
You must be signed in to change notification settings - Fork 812
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
vsxmake project doesn't like unicode characters #1689
Comments
Can you give me your *.vcproj files? |
Unfortunately GitHub doesn't allow me to put it here as a .vcxproj so I renamed its extension to .txt |
This is because vcproj and sln files need utf8 encoding with bom to support unicode characters. I tried to improve it, you try again. xmake update dev BTW, I have switched to lua5.3 runtime on dev. |
This fixed the first issue, I can now make project with unicode names which VS will recognize. However, the second issue is still there:
I checked the encoding of the .sln and .vcxproj files, they are in UTF-8 with BOM as expected. |
I removed <_XmakeExecutable>"$([System.IO.Path]::GetFullPath('$(XmakeProgramDirResolved)xmake.exe'))"</_XmakeExecutable>
<_XmakeEnv>
- chcp 65001 > NUL
pushd $(XmakeProjectDirResolved)
set XMAKE_CONFIGDIR=$(XmakeConfigDirResolved.TrimEnd('\').TrimEnd('/'))
set XMAKE_PROGRAM_DIR=$(XmakeProgramDirResolved.TrimEnd('\').TrimEnd('/'))
@@ -77,7 +76,6 @@
echo XMAKE_CONFIGDIR=%25XMAKE_CONFIGDIR%25
echo XMAKE_PROGRAM_DIR=%25XMAKE_PROGRAM_DIR%25
echo CD=%25CD%25
- chcp
</_XmakeEnv>
</PropertyGroup> @OpportunityLiu I don't know if the purpose of adding I'm not sure whether it will have other effects. |
I can confirm it works now, even if unicode output in VS console is still broken (but this is not really a big deal). Thanks a lot. I'm not sure if I should close this issue now but as far as I'm concerned it works. |
I closed it first, if there is still a problem, please reopen it. |
@waruqi That's the reason |
Got it, but I don't have any other way to fix it. |
I found no issue with this patch and it does fixes VS unicode character support! |
Describe the bug
I think there's two issues here:
First one: create a project with a unicode name (i'm using
é
here, which is common in french), generate a vsxmake project and:("introuvable" means "not found" here).
Second: create a project with a regular name in a path containing a unicode character (for example:
D:/xmakeunicode_é/project
) and try to build it:Building fails (project not found) as xmake works in another folder:
Expected behavior
That unicode characters are properly handled with Visual Studio.
Error output
Here's the log with verbose/diagnosis enabled:
We see that both
XMAKE_CONFIGDIR
andCD
are set to wrong path with invalid unicode characters.Related Environment
Additional context
The project doesn't matter much, I used a default project created using
xmake create
The text was updated successfully, but these errors were encountered: