ES.exe export file not in UTF-8

Found a bug in "Everything"? report it here
Post Reply
jo29
Posts: 28
Joined: Sat Sep 19, 2020 9:01 pm

ES.exe export file not in UTF-8

Post by jo29 »

Thanks for the great tool.

Export from the GUI is in proper UTF-8, while es.exe export messes up Unicode characters in file names (for example, emojis like 💲)
NotNull
Posts: 5261
Joined: Wed May 24, 2017 9:22 pm

Re: ES.exe export file not in UTF-8

Post by NotNull »

How do you export? By redirecting the output on the command-line?

ES has some command-line options for exporting (ES.exe /?):
Export options
-export-csv <out.csv>
-export-efu <out.efu>
-export-txt <out.txt>
-export-m3u <out.m3u>
-export-m3u8 <out.m3u8>
Export to a file using the specified layout.
-no-header
Do not output a column header for CSV and EFU files.
This will result in UTF8 encoded files.
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: ES.exe export file not in UTF-8

Post by void »

Please try changing the code page of your console:

Code: Select all

chcp 65001
This will set the code page of your console to UTF-8.
jo29
Posts: 28
Joined: Sat Sep 19, 2020 9:01 pm

Re: ES.exe export file not in UTF-8

Post by jo29 »

NotNull wrote: Sun Sep 25, 2022 8:37 pm How do you export? By redirecting the output on the command-line?

Code: Select all

es.exe * -export-efu output.efu
void wrote: Sun Sep 25, 2022 10:40 pm Please try changing the code page of your console:

Code: Select all

chcp 65001
This will set the code page of your console to UTF-8.
I tried. Same result.
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: ES.exe export file not in UTF-8

Post by void »

How are viewing the EFU file?
Maybe your program is expecting a UTF-8 bom? -there is no UTF-8 bom in exported EFU files from Everything or ES.


What version of ES and you using?
es.exe -version

What version of Everything are you using?
Help -> About



If you can, could you please send the EFU file to support@voidtools.com
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: ES.exe export file not in UTF-8

Post by void »

ES-1.1.0.25 adds a -utf8-bom command line option to write a UTF-8 byte order mark at the start of the export file.
jo29
Posts: 28
Joined: Sat Sep 19, 2020 9:01 pm

Re: ES.exe export file not in UTF-8

Post by jo29 »

void wrote: Mon Sep 26, 2022 6:02 am How are viewing the EFU file?
Notepad++. It automatically detects encoding. The export file created by the GUI opens in Notepad++ without a problem.

In both cases (GUI and ES.exe export) the file is read as UTF-8. The problem is that, with ES, many Unicode characters are messed up (replaced with question marks)

ES file:
f.png
f.png (242 Bytes) Viewed 7382 times
GUI file:
t.png
t.png (251 Bytes) Viewed 7382 times
What version of ES and you using?
1.1.0.24 (and also tried with 1.1.0.25. Same result)
What version of Everything are you using?
1.4.1.1020
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: ES.exe export file not in UTF-8

Post by void »

Thanks for the details, there is something odd going on with UTF-16 surrogates with ES.
I am able to reproduce the issue my end.

I am working on a fix..
jo29
Posts: 28
Joined: Sat Sep 19, 2020 9:01 pm

Re: ES.exe export file not in UTF-8

Post by jo29 »

Here are example files:
Output.zip
(482 Bytes) Downloaded 183 times
I noticed that ES.exe puts the BOM just before the Unicode character instead of at the beginning of the file.
jo29
Posts: 28
Joined: Sat Sep 19, 2020 9:01 pm

Re: ES.exe export file not in UTF-8

Post by jo29 »

jo29 wrote: Mon Sep 26, 2022 6:53 am I noticed that ES.exe puts the BOM just before the Unicode character instead of at the beginning of the file.
This happens even without the

Code: Select all

-utf8-bom
in version 1.1.0.24.

Thanks for the quick replies by the way.
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: ES.exe export file not in UTF-8

Post by void »

Thanks for the EFU output.

ES was incorrectly exporting Unicode characters outside plane 0 ($ emoji)

This issue should be fixed in ES-1.1.0.26
jo29
Posts: 28
Joined: Sat Sep 19, 2020 9:01 pm

Re: ES.exe export file not in UTF-8

Post by jo29 »

Issue is fixed, confirmed. Thanks a lot.
Post Reply