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

Johnny Gozde johnny at jgoz.net
Mon Aug 20 18:36:32 CEST 2012

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.

More information about the zeromq-dev mailing list