[
https://issues.apache.org/jira/browse/THRIFT-2873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14233606#comment-14233606
]
Ben Craig commented on THRIFT-2873:
-----------------------------------
[~pascal.bach] I think you are correct. TPipe and TPipeServer clients can
still get non-ASCII pipe names, so long as the code page is set correctly.
This doesn't cover every possible UNICODE code point, but it gets most of them.
I don't think there is a big use case for localized pipe names though, as they
typically aren't something that is customer visible.
If a client already has a name that they want, and it is in a wchar_t format,
then the client can call WideCharToMultiByte() and MultiByteToWideChar() as
appropriate. This doesn't cover 100% of the use cases, but it should cover 99%
of them.
> TPipe and TPipeServer don't compile on windows with UNICODE enabled
> -------------------------------------------------------------------
>
> Key: THRIFT-2873
> URL: https://issues.apache.org/jira/browse/THRIFT-2873
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.9.3
> Environment: Visual Studio 2013
> Reporter: Pascal Bach
> Assignee: Roger Meier
> Priority: Minor
> Labels: unicode, windows
> Attachments:
> 0001-Make-TPipe-and-TPipeServer-working-with-unicode-on-w.patch
>
>
> When compiling the Thrift C++ library with {{UNICODE}} enabled {{TPipe}} and
> {{TPipeServer}} won't compile as the are using {{LPSTR}} which only works
> with Multi byte charactersets.
> The appended patch uses {{LPTSTR}} instead of {{LPSTR}} which is set based on
> the {{UNICODE}} flag by Visual Studio.
> It also does some casts from raw {{const char *}} to {{LPCSTR}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)