Poco::Path constructors

A general discussion forum.
Posts: 20
Joined: 02 Nov 2010, 18:17

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?

Posts: 1199
Joined: 11 Jul 2006, 16:27
Location: Austria

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

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests