-
Notifications
You must be signed in to change notification settings - Fork 44
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
Problem with extended ASCII chars #43
Comments
Ah, really hoped that #6 fixed it.. I haven't been actively maintaining the library for a while now. And probably won't until things really break. However, you're free to create a pull request. The fix should be done here-ish: https://github.com/marceldev89/BattleNET/blob/master/BattleNET/Helpers.cs#L44. If you're not interested in providing a fix yourself then it will be a little while until I get around to fixing this. |
Seems that I figured a fix but not able to test it yet. Gonna give it a try later and report back here, from what I get it should be Encoding.Default instead of Encoding.UTF8. :) |
Changing it to Encoding.Default might break Cyrillic again. Please make
|
Encoding.Default will indeed break Cyrillic again. Make sure you use UTF-8 in any place you output/save data from BattleNET. |
From what I could find on the web, you'll have to check if the string contains any extended ASCII characters (code page 437) and convert them to UTF8 or 1252 and then return it as UTF8. |
@wordiboi, did you give up? 😄 |
@wordiboi can you test out the changes made by @DomiStyle? Would be appreciated. 🙂 |
Hi, yes that's exactly what I did a few months ago to fix this issue for my purposes. I also coded my own battleye tool in c++ meanwhile so I can use it on linux and windows with only a few adjustments. Just wasn't very active on github in the meantime ;) |
Unless you're talking about a GUI, you did know that BattleNET works fine on Linux using mono, right? ^^ Anyway, doesn't Windows-1251 affect people using the special characters from Windows-1252? |
Yes I know but atleast on my system some of the "infinite loops" inside BattleNET caused stack overflow exceptions and the program crashed, especially when the server was offline and it tried to reconnect for a long time. So e.g. shutting down the server for 30 minutes or just restarting it didn't cause any issue but leaving the server down for more than 1 hr and having the tool trying to reconnect during that period caused stack overflow exceptions.
I'm not sure about that, probably it needs an in-depth look but I didn't run into any situation where it didn't work for me. I was able to track every person regardless how they tried to "manipulate" their ingame name. EDIT: Just looked at the code I used and I just saw that I used Windows-1252 in the recent months which gave me the perfect result as described above. |
Hey,
thanks for the great library, I love using it. But there is one issue that causes me trouble, it is not possible to handle extended ascii chars with the library, so for example a character like "ÿ" is shown as "?". So a player who uses those characters in his nickname can't be handled with our admin tool as his nickname is shown as "????". So from what I get sending and receive the package should be handled a little bit different for situations like that.
Thank You
The text was updated successfully, but these errors were encountered: