go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

Using protoc to generate gateway grpc's pd file with garbled characters

Open haioa opened this issue 1 year ago • 1 comments

Describe the bug A clear and concise description of what the bug is. Using protoc to generate gateway grpc's pd file with garbled characters, Specific version:

PS D:\project\haiqiu-zero-admin> protoc --descriptor_set_out=gateway/hello.pb hello.proto
PS D:\project\haiqiu-zero-admin> goctl env
GOCTL_OS=windows
GOCTL_ARCH=amd64
GOCTL_HOME=C:\Users\haiqiu\.goctl
GOCTL_DEBUG=False
GOCTL_CACHE=C:\Users\haiqiu\.goctl\cache
GOCTL_EXPERIMENTAL=on
GOCTL_VERSION=1.7.0
PROTOC_VERSION=3.19.4
PROTOC_GEN_GO_VERSION=v1.34.2
PROTO_GEN_GO_GRPC_VERSION=1.5.1

Creating according to the tutorial provided on the official website resulted in garbled characters https://go-zero.dev/docs/tutorials/gateway/grpc image image

To Reproduce Steps to reproduce the behavior, if applicable:

  1. The code is

    syntax = "proto3";
    
    

package hello; option go_package = "./hello"; message Request { } message Response { string msg = 1; } service Hello { rpc Ping(Request) returns(Response); }


2. The error is

‚ hello.protohello" Request" Response msg ( Rmsg20 Hello' Ping.hello.Request.hello.ResponseB Z./hellobproto3


**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environments (please complete the following information):**
- OS: [e.g. Linux]
- go-zero version [e.g. 1.2.1]
- goctl version [e.g. 1.2.1, optional]

**More description**
Add any other context about the problem here.

haioa avatar Aug 15 '24 08:08 haioa

Descriptor provides a series of functions and types to provide reflection capabilities for grpc, so the resulting product is not pg.go, but descriptor

kesonan avatar Aug 18 '24 14:08 kesonan

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Aug 20 '25 02:08 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Nov 21 '25 02:11 github-actions[bot]