Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: meta_get() Unicode (Read 388 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

meta_get() Unicode

Code: [Select]
const char* title = fileInfo->meta_get("title", 0);
Code: [Select]
const char* url_file_path = handle->get_path();
Do it is possible instead get WCHAR ?

Re: meta_get() Unicode

Reply #1
You get UTF-8, which is another way to encode Unicode.

If you want wchar_t:
Code: [Select]
#include <pfc/string-conv-lite.h>

auto myWideString = pfc::wideFromUTF8(myinfo.meta_get(...));
Older code uses:
Code: [Select]
pfc::stringcvt::string_wide_from_utf8 widestring(myinfo.meta_get(...));
We are the bork. Your software bugs will be added to our own. Resistance is futile.

 

Re: meta_get() Unicode

Reply #2
It work, ty!
Code: [Select]
wchar_t lng[1024] = { 0 };
out->write(titleformat_inputtypes::meta, lng);
Do it is possible to return a wchar_t instead of char?