Encoding problem - SDK ?

Plug-in and third party software discussion.
Post Reply
dinhluanbmt
Posts: 3
Joined: Wed Apr 24, 2013 9:10 am

Encoding problem - SDK ?

Post by dinhluanbmt »

Dear all,
I could run C# sample code from Everything SDK. but I got some errors
- only English character give me the correct result. ( the path or file name in Korean can not display)
- when I type Korean Character to the search box, the result is zero.

Everything (installed program) could run well and give correct result when i use Korean character.

Could anyone tell me how to use : Everything_SetSearch(), Everything_GetResultFullPathName()...function with Korean character ?.
Normally, when I work with Korean character, I use wchar_t (c++) string (c#) and get correct result.

Thank you very much,
Best regards,
Luan Dinh
void
Developer
Posts: 16665
Joined: Fri Oct 16, 2009 11:31 pm

Re: Encoding problem - SDK ?

Post by void »

Please make sure you compile your application with the Unicode character set.

Check if UNICODE is defined.
Otherwise use the functions ending with W

Code: Select all

Everything_SetSearchW()
Everything_QueryW()
Everything_GetResultFullPathNameW()
If you are displaying results to a console you might need to set the console to UTF-16

Code: Select all

setmode(_fileno(stdout),_O_U16TEXT);
If necessary use wcout instead of cout.

For example:

Code: Select all

Everything_SetSearchW(L"안녕하세요");
Everything_QueryW(TRUE);
if (Everything_GetNumResults())
{
    wcout << Everything_GetResultFullPathNameW(0);
}
dinhluanbmt
Posts: 3
Joined: Wed Apr 24, 2013 9:10 am

problem solved - Thank you

Post by dinhluanbmt »

problem solved !
Thank you very much for your help.
Best regards,
Luan Dinh.
Post Reply