You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating input files with a normal text editor in Linux and then trying to use your tool with those files doesn't work.
The tool exits with the error: Error parsing input file: Unexpected value: [...some garbage].
The problem is that normal text files get encoded with UTF-8 and your tool expects UTF-16LE encoding for the input files.
Solution:
A solution for the above mentioned issue is to simply convert those files to UTF-16LE.
vim input.txt
:set bomb
:set fileencoding=utf-16le
:wq! output.txt
Note
The Byte Order Mark (BOM) is not needed for the input file to work as setup_var.efi strips it away anyway. However, without it, displaying the input file in the UEFI shell would be a bit ugly.
Expectations:
I don't know if you want to make your tool compatible with other file encodings, but I would somehow expect this to be mentioned in the documentation somewhere. Maybe this will help other people in future facing the same issue. It took me a while to figure out what was causing the problem :D
When creating input files with a normal text editor in Linux and then trying to use your tool with those files doesn't work.
The tool exits with the error: Error parsing input file: Unexpected value: [...some garbage].
The problem is that normal text files get encoded with UTF-8 and your tool expects UTF-16LE encoding for the input files.
Solution:
A solution for the above mentioned issue is to simply convert those files to UTF-16LE.
With
iconv:With
vim:Note
The Byte Order Mark (BOM) is not needed for the input file to work as
setup_var.efistrips it away anyway. However, without it, displaying the input file in the UEFI shell would be a bit ugly.Expectations:
I don't know if you want to make your tool compatible with other file encodings, but I would somehow expect this to be mentioned in the documentation somewhere. Maybe this will help other people in future facing the same issue. It took me a while to figure out what was causing the problem :D