googleapis / googleapis/cloud-bigtable-cbt-cli
Support UTF-8 strings for `read` and `lookup` outputs while using `ProtocolBuffer` encoding
- Dominant language
- Go
- Stars
- 15
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for stopping by to let us know something could be better!
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
**Is your feature request related to a problem? Please describe.**
When I use `ProtocolBuffer` encoding, I'm frustrated by string value encoded in unreadable bytes.
For example, a Korean string "경동나비엔" is printed as "\352\262\275\353\217\231\353\202\230\353\271\204\354\227\224".
**Describe the solution you'd like**
I would like `cbt` to support UTF-8 string in `read` or `lookup` output.
**Describe alternatives you've considered**
I found that the unreadable byte sequence is from `message.MarshalTextIndent()`([link](https://github.com/googleapis/cloud-bigtable-cbt-cli/blob/ab74f58df9255cadccec4d36bc1aed38481d25f2/valueformatting.go#L236)). If we use `message.MarshalJSONIndent()` instead, a UTF-8 string can be correctly printed like "경동나비엔". So it would be also good if `cbt` allows users to choose `prototext` or `protojson` as the output format. Then `prototext` will still output bytes in octal, but I can choose `protojson` to see UTF-string.
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.