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

General discussion related to "Everything".
Post Reply
hardik
Posts: 19
Joined: Mon Sep 02, 2019 4:24 pm

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

Post by hardik » Tue Nov 19, 2019 1:45 pm

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.
You do not have the required permissions to view the files attached to this post.

NotNull
Posts: 2109
Joined: Wed May 24, 2017 9:22 pm

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

Post by NotNull » Tue Nov 19, 2019 3:07 pm

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 )

hardik
Posts: 19
Joined: Mon Sep 02, 2019 4:24 pm

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

Post by hardik » Mon Jan 06, 2020 7:52 am

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?

NotNull
Posts: 2109
Joined: Wed May 24, 2017 9:22 pm

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

Post by NotNull » Mon Jan 06, 2020 8:34 am

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.

void
Site Admin
Posts: 5458
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void » Mon Jan 06, 2020 9:07 am

Currently, there's no console font that supports the Unicode emoji plane.

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

hardik
Posts: 19
Joined: Mon Sep 02, 2019 4:24 pm

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

Post by hardik » Mon Jan 20, 2020 7:27 am

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?

void
Site Admin
Posts: 5458
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void » Fri Jan 24, 2020 12:09 pm

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.

Post Reply