On Wed, Sep 25, 2024 at 12:53 PM 'Jon Godbout' via Protocol Buffers <
[email protected]> wrote:

> Interesting problem, I have a text format printer writing infinity.
> My (cl-protobufs) printer wants to write the inifinity symbol, while
> c++ wants to write \342\210\236.
> Am I wrong they are both correct?
>

By default the TextFormat class will escape non-ascii characters.
If you want to print UTF8 characters you can tell the TextFormat::Printer
this by calling SetUseUtf8StringEscaping.
See
https://protobuf.dev/reference/cpp/api-docs/google.protobuf.text_format/#TextFormat.Printer.SetUseUtf8StringEscaping.details

-- 
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/af820eaf-008e-4987-9710-46fdcd977854n%40googlegroups.com
> <https://groups.google.com/d/msgid/protobuf/af820eaf-008e-4987-9710-46fdcd977854n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CAM9aRsLXgOzfk0wWxz-k8J6eUM61PMmeTFD2LbLQNizFbvqUkA%40mail.gmail.com.

Reply via email to