-
Notifications
You must be signed in to change notification settings - Fork 15.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
io_win32 does not handle non-ascii chars in paths. #3951
Comments
Can you avoid non-ASCII characters in your dir path? The protobuf code base assumes UTF-8 for char encoding so it likely doesn't work well with non-ASCII characters in non-UTF-8 environment. |
@laszlocsomor Could you please take a look at this? |
I can take a look later today, have another important bug on my plate. |
Indeed, this is a bug, I could repro it, and it works on Linux and doesn't on Windows. |
@pherl : I can't self-assign this bug. Could you assign it to me please? |
Hmm, looks like I can only assign the issue to one of the owners of the project. BTW, what do you think about the other issue about wildcast no longer works on windows protoc (#3957)? |
3
|
@pherl : I'm still trying to understand whether the other issue is related to this one or not. Maybe you can tell this: do you know how the CLI expands wildcard patterns to a list of filenames? (I could figure it out but asking is easier. ;) Also, it seems that already the
|
For the record, my edit is:
|
FYI, I have a bugfix that I'll send a PR for shortly, that fixes the original issue in this thread:
|
Created a PR with my bugfix that I mentioned in my previous comment: #3978 |
Do not use "googletest.h", apprently that leads to linking errors on Windows which I couldn't figure out how to solve, and decided to just go with plain gTest instead. See protocolbuffers#3951
protoc.exe --cpp_out=. ./helloworld.proto
If the path is in Chinese, this problem will arise.
The GetCurrentDirectoryA function returns the GB18030 encoding
Using MultiByteToWideChar (CP_UTF8, 0, s.c_str (), s.size (), result.get (), len + 1) error ,CP_ACP should be used。
file :src\google\protobuf\stubs\io_win32.cc
The text was updated successfully, but these errors were encountered: