[zeromq-dev] C# client doesnt recieve messages from C++ server

Alexander Voron voron.alexander at gmail.com
Mon Aug 20 20:01:25 CEST 2012

Johnny, you are right. I changed encoding scheme in
subscriber.Subscribe() and subscriber.Recv() methods to ASCII and
UTF-8, and in both cases client is able to recieve messages.

Thanks a lot!

On 20 August 2012 20:36, Johnny Gozde <johnny at jgoz.net> wrote:
> It looks like you're using Encoding.Unicode in your C# program, which
> is a 2-byte unicode representation (UTF-16). Your C++ program is using
> ZMQ subscription matching works on the byte level and does not convert
> between character encodings, so this is probably where your issue is.
> Try switching to Encoding.ASCII or Encoding.UTF8 in your C# program.
> Alternately, use wide chars in your C++ program, as Bennie suggested.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list