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
result not right when deal with bytes in string #256
Comments
yup, you're right
you can add equality check to get only characters that don't get mapped correctly using that's why your |
after more investigation, it seems like the problem is not with it's calling this method in private static int Unicode2Ascii(int i)
{
if (i >= 0 && i < 255)
return i;
return (int)'?';
} it will return the character private static int Unicode2Ascii(int i)
{
if (i >= 0 && i <= 255)
return i;
return (int)'?';
} I will do more testing and confirm this |
check #273 in case you're still interested |
maybe the true reason is that moonsharp save
|
yeah, you're right, I think this also causes other problems. I will need to investigate more to confirm the root of this issue (Lua string as C# string). I have one scenario, if you share a string that contains the character I called a C# function from lua, this function accepts a string and I am passing ascii I faced this issue initially, so I decided to go and convert strings into hex code and then move them to my |
fix Unicode2Ascii does not return char of ascii code 255 (fixes #256)
I have two functions:
when I used in nlua or some other such as elua, I got right results:
but when I use those code in moonsharp, it's wrong:
The text was updated successfully, but these errors were encountered: