[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re-3: grub-mkconfig does not accept UTF-8-coded grub files
From: |
Thomas Schmitt |
Subject: |
Re: Re-3: grub-mkconfig does not accept UTF-8-coded grub files |
Date: |
Tue, 17 Jan 2017 14:45:22 +0100 |
Hi,
Kim Olsen wrote:
> Libre Office Writer 4.3.3.2 creates UTF-8-coded text files with three
> special characters at the beginning of the file.
> 00000000 ef bb bf ...
That's the Byte-Order-Mark for UTF-8, where it is quite useless,
as UTF-8 offers no choice of byte order.
https://en.wikipedia.org/wiki/Byte_order_mark
"The Unicode Standard permits the BOM in UTF-8, but does not require
or recommend its use."
> The command "cat" has no problem with them
"cat" copies bytes regardless of their content.
The fact that the output appears on your terminal without visible BOM
is probably a property of your terminal.
My xterm displays an empty rectangle frame as first character.
> /usr/sbin/grub-mkconfig: 1: /etc/default/grub: ffef#: not found
Your shell (bash ?) does not have this property of ingnoring BOM.
> This is why also "grub-mkconfig" should be able to process such files,
So your complaint is that grub-mkconfig reads the configuration values
from file /etc/default/grub by executing it as shell script, rather
than having an own interpreter for that file.
(At least on my machine, grub-mkconfig is a shell script itself.
So the temptation to do this is understandable.)
Whatever, the workaround is to keep your shell script editor from
adding fancy character sequences to the configuration script
/etc/default/grub .
If your editor is supposed to be usable for shell programming, then it
is supposed to have a mode that omits the BOM sequence.
Have a nice day :)
Thomas