-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Mono is unable to find assemblies named with some international characters #103276
Comments
CC @steveisok |
Yea it's just not properly dealing with non-ASCII UTF8: while (*p && (isalnum (*p) || *p == '.' || *p == '-' || *p == '_' || *p == '$' || *p == '@' || g_ascii_isspace (*p)))
p++;
if (quoted) {
if (*p != '"')
return 1;
*p = 0;
p++;
}
g_strchomp (s);
assembly->name = s;
if (*p != ',') {
g_strchomp (s);
assembly->name = s;
return 1;
}
This function should at least check for the high bit and then go down a slow path that uses unicode-aware parsing. (Or possibly this |
#45033 tracks switching Mono to shared type name parser. It would fix this and number of other bugs in the Mono type name parser (see tests disabled against 45033). |
@fanyang-mono we'll need to backport this to 8 once you have a fix as well. |
Description
Type.GetType fails if using fully qualified assembly names where the assembly has certain international characters.
Reproduction Steps
Test case: testcase-3df4585.zip
Execute this to see failure:
$ rm -rf bin obj $ dotnet build /p:AssemblyName=工程 $ bin/Debug/net8.0-maccatalyst/maccatalyst-*/工程.app/Contents/MacOS/工程
The test code is doing this:
Expected behavior
Actual behavior
Regression?
I don't think so.
Known Workarounds
Stick to ASCII...
Configuration
Other information
Using a different assembly name works fine:
$ rm -rf bin obj $ dotnet build /p:AssemblyName=ThisWorks $ bin/Debug/net8.0-maccatalyst/maccatalyst-*/ThisWorks.app/Contents/MacOS/ThisWorks ✅ PASSED found testcase.AppDelegate, ThisWorks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
The problem seems to be in
assembly_name_to_aname
:I believe the returned MonoAssemblyName should be:
The text was updated successfully, but these errors were encountered: