Because Firefox doesn't load local files with UTF8 characters like '📞, …, 🖥' in the HTML or the CSS correctly, since it does not receive a
<meta charset="utf8" /> header, I need to tangle files with a Byte-Order-Mark.
I knew that my needed BOM was
My first try was just prepending this block:
#+BEGIN_SRC fundamental \357\273\277 #+END_SRC That line in emacs is really 3 characters, not 12 as rendered here
When I tangle with
C-c -v -t, I get a "Select coding system" prompt twice, where I have to choose `utf-8-with-signature' both times.
That puts the BOM at the front of the file, but also another time at the end. Then I
find-file-literally the tangle result file, to remove the trailing one manually. And I have a "superfluous" Source Block...
The other work-around, which I have been using since then: Using
#+BEGIN_SRC shell :tangle no sed -i '1s/^\(\xef\xbb\xbf\)\?/\xef\xbb\xbf/' Empty.org.htm #+END_SRC
and then I just tangle that chapter, and execute the shell block afterwards. That became muscle memory and thus fast (enough). But also another source block needed in the doc.
I always wondered about the correct™ way to do this. From my reading I suspect, there is a variable I can set somewhere as a header var, or in a property drawer.