Overview
Features
Download
Documentation
Community
Add-Ons & Services

Why POCO::Path does not support unicode characters?

A general discussion forum.

Why POCO::Path does not support unicode characters?

Postby wxShayan » 17 Jun 2013, 08:26

Hello,
Why Path, File, and many other classes in POCO do not support unicode characters? They just take std::string as input arguments and not std::wstring.
How can I address filesystem directories and files in other languages?
wxShayan
 
Posts: 2
Joined: 17 Jun 2013, 07:55

Re: Why POCO::Path does not support unicode characters?

Postby guenter » 17 Jun 2013, 09:01

Use the mighty power of UTF-8.
guenter
 
Posts: 1138
Joined: 11 Jul 2006, 16:27
Location: Austria

Why POCO::Path does not support unicode characters?

Postby wxShayan » 17 Jun 2013, 09:21

I used UTF-8 but it seems that Windows does not display non-English unicode filenames which converted to utf-8 correctly.
Suppose the following scenario:

Code: Select all
QString filename = "NON-ENGLISH FILENAME";
File file(filename.toUTF8().data());
file.createFile();


The file will create but Windows does not display it's name correctly. The resulting filename contains unreadable characters.
wxShayan
 
Posts: 2
Joined: 17 Jun 2013, 07:55

Re: Why POCO::Path does not support unicode characters?

Postby alex » 17 Jun 2013, 14:26

Did you compile POCO with POCO_WIN32_UTF8 (it's default) ? If so, File_WIN32U.cpp should be compiled in and utf8 <-> utf16 conversion should take place. You may also want to check Character Sets Used in File Names
alex
 
Posts: 1132
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron