Page 1 of 1

es.exe is returning ? in place of emojis in the folder name

Posted: Tue Nov 19, 2019 1:45 pm
by hardik
Considering a scenario wherein a folder is present under D drive bearing name as seen in the attachment named ActualFolderName. Then the command es.exe parent:"D:" returns the result as seen in the attachment named "Capture". Is there a way in which the actual folder name can be returned using the es command?

Any help regarding the above will be appreciated.

Thank you for the help.

Re: es.exe is returning ? in place of emojis in the folder name

Posted: Tue Nov 19, 2019 3:07 pm
by NotNull
How characters are shown is dictated by 2 factors:
1. codepage
2. font

1. Codepage
You need to select a codepage that contains the characters you want. No guarantee that this works as it might be possible that some chars are only in codepage 1 and others only in codepage 2.

Check the current codepage in CMD by issuing the command CHCP
Change the codepage to - for example - unicode by issuing the command CHCP 65001
More on CHCP


2. Font
The font you use in CMD must have support for these special characters (if it isn't in the font, it can't be shown).
Try Lucida Console.
You can change the font by right-clicking the CMD title bar and choosing Properties.


CMD has very limited support for unicode characters, so I have my doubts if you can make this work.
The good news: If you export the results to a file, it will be UTF8 encoded and thus have support for special characters.
(try: es.exe parent:"D:" -export-txt output.txt )

Re: es.exe is returning ? in place of emojis in the folder name

Posted: Mon Jan 06, 2020 7:52 am
by hardik
Tried both changing the code-page and using different fonts, but none of them worked.
Any plans of having this feature (Everything itself returning the emoticons in file and folder name instead of question marks) as a part of next release?

Re: es.exe is returning ? in place of emojis in the folder name

Posted: Mon Jan 06, 2020 8:34 am
by NotNull
Did you understand anything of what I wrote *at all* ?

ES.exe is not the problem; the console (host) is. It has very limited support for showing special characters.
(all input and output of ES.exe is handled by the console host).

And as you didn't mention which (emoji) characters, I would say:
What you want is not possible. Get over it.

Re: es.exe is returning ? in place of emojis in the folder name

Posted: Mon Jan 06, 2020 9:07 am
by void
Currently, there's no console font that supports the Unicode emoji plane.

Even the DIR command is unable to output the correct filename.

Re: es.exe is returning ? in place of emojis in the folder name

Posted: Mon Jan 20, 2020 7:27 am
by hardik
Thanks for the information @void.

When I had tried using the Everything SDK, I was able to retrieve proper emojis in names of files and folders. However, for few other emojis, the SDK returned the unicode characters instead.

I tried the same by using es commands that run through command line but got question marks instead (as discussed previously).

Is there any encoding format being used in SDK that is facilitating the viewing of emojis?

Re: es.exe is returning ? in place of emojis in the folder name

Posted: Fri Jan 24, 2020 12:09 pm
by void
The SDK uses UTF-16 (Unicode).
Please make sure you use the SDK functions ending with W (Wide Characters) and not the functions ending with A (ANSI)

Two UTF-16 characters might be required to store some Emoji characters (unicode values >= 0x10000).

eg:
😀
is stored as two UTF-16 characters (surrogate pairs):
0xd83d 0xde00

It's up to the caller on how these characters are displayed.