Overview
Features
Download
Documentation
Community
Add-Ons & Services

Poco::Path constructors

A general discussion forum.

Poco::Path constructors

Postby elemings » 11 Nov 2010, 19:42

Why does Poco::Path constructors only support `const char*' and `std::string' initialization? Why not `const wchar_t*' and `std::wstring' constructors? Or a `CharType' template constructor?
elemings
 
Posts: 20
Joined: 02 Nov 2010, 18:17

Re: Poco::Path constructors

Postby guenter » 12 Nov 2010, 00:32

Because in POCO Unicode is generally handled by using UTF-8 encoded std::strings. This also applies to paths and other system identifiers. When interfacing the WIN32 API, POCO usually uses the Unicode APIs and transparently handles UTF-8 to UTF-16 conversion and vice versa. This has shown to be the best compromise with regards to cross-platform portability (compared to alternatives like using std::wstring, or, god forbid, yet another custom Unicode string class).
guenter
 
Posts: 1110
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron