Giter Site home page Giter Site logo

Comments (9)

RyanTT avatar RyanTT commented on May 28, 2024

I believe this is due to the RCON protocol only utilizing ASCII, so it might be I can't do anything about it. Is there a different library or tool that's capable of handling cyrillic?

from bytexdigital.battleye.rcon.

EgoBrainProgrammer avatar EgoBrainProgrammer commented on May 28, 2024

Of course have.
Check it out.
https://github.com/marceldev89/BattleNET
This library can to handle cyrillic. But i have issues with connection to the server in DOTNET CORE.
But your library has connection fine in DOT NET CORE.

from bytexdigital.battleye.rcon.

RyanTT avatar RyanTT commented on May 28, 2024

I see, please try the latest dev branch commit d382e4f

from bytexdigital.battleye.rcon.

EgoBrainProgrammer avatar EgoBrainProgrammer commented on May 28, 2024

I see, please try the latest dev branch commit d382e4f

Hi. I am using your library from nuget. How to do update and get last commit?

PM> Update-Package BytexDigital.BattlEye.Rcon
No package updates are available from the current package source for project

from bytexdigital.battleye.rcon.

EgoBrainProgrammer avatar EgoBrainProgrammer commented on May 28, 2024

Please compile release version and public it on NuGet.

from bytexdigital.battleye.rcon.

EgoBrainProgrammer avatar EgoBrainProgrammer commented on May 28, 2024

Ok. F... the NuGet. I just pull your dev branch and include sources to my solution.
So getting this error:

Unhandled exception. System.NotSupportedException: No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.

from bytexdigital.battleye.rcon.

RyanTT avatar RyanTT commented on May 28, 2024

You can find the pre-release build here
https://www.nuget.org/packages/BytexDigital.BattlEye.Rcon/1.0.2-beta.1

from bytexdigital.battleye.rcon.

EgoBrainProgrammer avatar EgoBrainProgrammer commented on May 28, 2024

I solve 1251 issue.
I am suggest you to use UTF8Encoding class instead Encoding.

`
using System.Text;

namespace BytexDigital.BattlEye.Rcon
{
public class StringEncoder
{
//private readonly Encoding _encoding = Encoding.GetEncoding(1252);
private readonly UTF8Encoding utf8string = new UTF8Encoding();

    //public byte[] GetBytes(string message) => _encoding.GetBytes(message);
    //public string GetString(byte[] bytes) => _encoding.GetString(bytes);
    public byte[] GetBytes(string message) => utf8string.GetBytes(message);
    public string GetString(byte[] bytes) => utf8string.GetString(bytes);
}

}
`

This code works. Tested with cyrillic and chinese.

from bytexdigital.battleye.rcon.

RyanTT avatar RyanTT commented on May 28, 2024

You can now use the nuget beta build
https://www.nuget.org/packages/BytexDigital.BattlEye.Rcon/1.0.2-beta.2

from bytexdigital.battleye.rcon.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.