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

Rewired: non-valid Unicode characters in generic parameter name #130

Open
laymain opened this issue Jun 10, 2024 · 3 comments · Fixed by #154 · May be fixed by #177
Open

Rewired: non-valid Unicode characters in generic parameter name #130

laymain opened this issue Jun 10, 2024 · 3 comments · Fixed by #154 · May be fixed by #177
Labels
bug Something isn't working generation Related to assembly generation
Milestone

Comments

@laymain
Copy link

laymain commented Jun 10, 2024

Hi,

Il2CppInterop happens to generate non valid method/type names with some unicode characters.

In my case, it occurs with the Rewired library, it produces the following type name:
Il2CppRewired_Core.dll Has an Invalid Type Name String "MethodInfoStoreGeneric_nqXVGKvgfzozBIAcnvWAyMFzaDld_Internal_Static_Int32_IList_1_☺_Predicate_1_☺_Int32_0`1"
which contains two SOH (U+0001) characters.

See LavaGang/MelonLoader#659

@laymain
Copy link
Author

laymain commented Jun 10, 2024

Here is the method prototype that causes the issue:
internal static int nqXVGKvgfzozBIAcnvWAyMFzaDld<\u0001>(IList<\u0001> P_0, Predicate<\u0001> P_1, int P_2) where \u0001 : Element

It could be that the generic type arguments are not protected against invalid characters

laymain added a commit to laymain/Il2CppInterop that referenced this issue Jun 12, 2024
@ds5678 ds5678 changed the title Rewired: non-valid Unicode characters in type name Rewired: non-valid Unicode characters in generic parameter name Jul 15, 2024
@ds5678 ds5678 added bug Something isn't working generation Related to assembly generation labels Jul 15, 2024
@ds5678 ds5678 added this to the 1.4.6 milestone Jul 15, 2024
@ds5678
Copy link
Collaborator

ds5678 commented Sep 8, 2024

@laymain Can you test #154?

@laymain
Copy link
Author

laymain commented Sep 17, 2024

Hi @ds5678, thanks for your update.

However the issue isn't fixed, invalid characters are still present:

image

Here is the dll, it may help: https://filetransfer.io/data-package/ItWPVhJV#link

@ds5678 ds5678 reopened this Sep 18, 2024
@ds5678 ds5678 linked a pull request Sep 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working generation Related to assembly generation
Projects
None yet
2 participants