[ 
https://issues.apache.org/jira/browse/THRIFT-2873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14233593#comment-14233593
 ] 

Pascal Bach commented on THRIFT-2873:
-------------------------------------

[~ben.craig] I'm new to windows and also not to familiar with the whole UNICODE 
story.
If I understand correctly you can not use {{std::string}} with UNICODE and use 
the macro {{WaitNamedPipe}} because this referres to {{WaitNamedPipeW}} and 
excepts an {{
std::wstring}}. So I agree that the correct solution would be to use the {{*A}} 
functions.
Are there any consequences in using these in contrast to the {{*W}} unicode 
versions? Or otherwise asked will this cause problems related to unicode?

[~jensg] What you mean by consequently using LP(C)TSTR? Do you mean replacing 
std::string with LPTSTR? The question then is do we need to support both MBCS 
and UNICODE? Microsoft suggests using unicode only. 
(http://msdn.microsoft.com/en-us/library/cwe8bzh0.aspx)

> 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)

Reply via email to