Coder Social home page Coder Social logo

Comments (5)

zanfranceschi avatar zanfranceschi commented on June 11, 2024

I'm not sure if it fits here -- i'm sorry if not. ZFrame.ReadString() is not reading all the received string in one call. I'm having to ZFrame.ReadString() more than once in a loop to read all the received string.

I'm doing something like:

string theStringIWant = string.Empty;
string auxString = string.Empty;

do
{
    auxString = frame.ReadString();
    theStringIWant += auxString;
}
while (!string.IsNullOrEmpty(auxString));

I've tried different Encoding and nothing changed. Anyway, I found out that for each special character used in the string, there is one less byte in the string after calling ReadString(). For instance:

If my sent string is:
Hêllo

The following happens in the receiving side:

a = frame.ReadString();
b = frame.ReadString();
// a = Hêll
// b = o

That's way I'm using a loop.

Is this by design or is it a bug?

I'm using the nuget version 4.1.0.15

from clrzmq4.

metadings avatar metadings commented on June 11, 2024

You definitifely need the update to the current version (v4.1.0.17)... I don't know if I got it right in the last version (v...15, v...16) so please just install/git pull the update.

That was a bug resolved in some commit with ReadString and ReadLine...

from clrzmq4.

zanfranceschi avatar zanfranceschi commented on June 11, 2024

This bug persists in the 4.1.0.17 version. Just tried it.

from clrzmq4.

metadings avatar metadings commented on June 11, 2024

I don't have problems right now... Please try writing/reading the string using Encoding.ASCII.

from clrzmq4.

metadings avatar metadings commented on June 11, 2024

irrelevant, as of v4.1.0.xx

from clrzmq4.

Related Issues (20)

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.