fastcgipp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fastcgipp-users] string problem


From: Eddie Carle
Subject: Re: [Fastcgipp-users] string problem
Date: Sun, 5 Apr 2009 18:57:33 -0600
User-agent: KMail/1.11.1 (Linux/2.6.27-gentoo-r8; KDE/4.2.1; x86_64; ; )

On Sunday 05 April 2009 3:37:01 pm Goran wrote:
> Hi all!
>
> I'm starting with fastcgi++ and I have a problem concerning
> "session.cookies".
>
> For a first start I watched at the cookies with:
>
> out << session.cookies;
>
> That's fine, but I have to parse the cookie. For parsing I need a
> "std::string".
>
> // ugly
> std::basic_string<wchar_t> cookie = session.cookies;
>
> // fine but impossible
> std::string cookie = session.cookies;
>
> What should I do?

You have to decide whether or not you want to use std::string or std::wstring. 
If you want to implement in/out utf32-utf8 code conversion, you have to use 
std::wstring. This means that Request gets wchar_t as the template parameter. 
Then you have to do everything with wstring instead of string. If you're not 
interested in wide character usage and code conversion, just pass char as the 
template parameter and everything will be std::string.
-- 
        Eddie Carle

        This message has been signed with an RFC4880 signature. It is 
guaranteed to
        have originated from Eddie Carle and its contents can be validated 
against
        its signature.

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]