gRPC JSON mutation format encoding issues

I am currently trying to push data from a ruby client via gRPC.

Unfortunately, I am having encoding issues. When I try to send characters like “ö” it fails with the conversion from UTF-8 to ASCII-8BIT. Any idea how to solve that? Or is it an implementation error on the ruby grpc library?

Edited: From what I have seen it is related to ProtoBuffers. Whenever I want to set a UTF-8 string with some non-trivial characterts, it fails. I guess I have to fallback to HTTP for now.

Ok, my bad… in ruby you are supposed to call .b on a string to return a copied string whose encoding is ASCII-8BIT.

https://ruby-doc.org/core-2.3.0/String.html#method-i-b

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.