-
Notifications
You must be signed in to change notification settings - Fork 16k
Description
What version of protobuf and what language are you using?
libprotoc 3.3.0 / Grpc.Tools 2.28.1
What operating system (Linux, Windows, ...) and version?
Windows 10 Build 1803
What did you do?
- Create
test.rspcontaining non-ascii:
--plugin=protoc-gen-grpc=ágrpc_csharp_plugin.exe
--grpc_out=grpc_out
test.proto
- Run
protoc.exe @test.rsp
What did you expect to see
protoc running and creating the files.
What did you see instead?
UTF-8 without BOM: --grpc_out: protoc-gen-grpc: Das System kann die angegebene Datei nicht finden.
UTF-8 with BOM: You seem to have passed an empty string as one of the arguments to C:\Users\dejhbk0l\.nuget\packages\grpc.tools\2.28.1\tools\windows_x64\protoc.exe. This is actually sort of hard to do. Congrats. Unfortunately it is not valid input so the program is going to die now.
Anything else we should know about your project / environment
https://github.com/protocolbuffers/protobuf/blame/master/src/google/protobuf/compiler/command_line_interface.cc#L1326 uses std::ifstream instead of std::wifstream and therefore does not allow BOM or wide characters.
This is a minimal example. We stumbled over this in grpc/grpc#17995 as we distribute protoc and the protoc-gen-grpc through NuGet and the default for dotnet nuget locals global-packages is %userprofile%\.nuget\packages\. For some of our users, the username includes non-ascii characters which leads to protoc-gen-grpc containing non-ascii characters and the argument file not being parsable.