Skip to content
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

Why Syslog Print Chinese garbled? #171

Open
qinguoren opened this issue Feb 7, 2021 · 6 comments
Open

Why Syslog Print Chinese garbled? #171

qinguoren opened this issue Feb 7, 2021 · 6 comments
Labels
bug Something isn't working question

Comments

@qinguoren
Copy link

Instructions

Here, you can ask a question about Detours, and a maintainer or someone from
the community will answer. Please read the examples below, then delete all of
this text and replace it with your question. If you aren't sure whether a
question is on-topic, just go ahead and ask it! :-)

Please make sure to check the Wiki, esspecially the FAQ, to make sure your
question hasn't been answered there already:
https://github.com/microsoft/Detours/wiki/FAQ

On-Topic Examples

Off-Topic Examples

  • Questions about non-Detours components, such as the compiler, the Windows API,
    the Visual Studio IDE, etc.
  • Questions about whether you've encountered a bug in Detours. Instead of this
    Question template, please use the Bug Report template, because we'll need
    a command-line test case and the other information requested there.
@qinguoren
Copy link
Author

Thank U!

@bgianfo
Copy link
Contributor

bgianfo commented Feb 11, 2021

Please fill out the template, you haven't provided any information to help us answer your question.

@bgianfo bgianfo added the needs-author-feedback This issue / or pull request requires author feedback before more action can be taken. label Feb 11, 2021
@qinguoren
Copy link
Author

such as:
1 260 50.60: trcapi32: 001 -GetModuleFileNameA(,C:\Users\Administrator\Desktop\股票软件\股票自动交易助手3.0.5.2\StockOrder.exe,) -> 4e This is Right.
but 0 260 50.60: trcapi32: 001 -GetModuleFileNameW(,C:\Users\Administrator\Desktop\o鯸戗?㎏3.0.5.2\StockOrder.exe,) -> 42 This is wrong
The Chinese printed by the API with "W" at the back is garbled.
"o鯸戗?㎏“ is garbled.

@bgianfo
Copy link
Contributor

bgianfo commented Feb 12, 2021

It sounds like a bug in wide string handling in VSafePrintf:

VOID VSafePrintf(PCSTR pszMsg, va_list args, PCHAR pszBuffer, LONG cbBuffer)

@bgianfo bgianfo added the bug Something isn't working label Feb 12, 2021
@bgianfo
Copy link
Contributor

bgianfo commented Feb 12, 2021

A patch would be appreciated if you can figure out what's going on. Reproing this will be difficult for me 😊

@bgianfo bgianfo removed the needs-author-feedback This issue / or pull request requires author feedback before more action can be taken. label Feb 12, 2021
@qinguoren
Copy link
Author

Thank U! but My C++ language is not good, I can have a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question
Projects
None yet
Development

No branches or pull requests

2 participants