A simple file with umlauts compiled using make4ht test "xhtml,charset=utf-8" " -cunihtf -utf8" shows question marks instead of German umlauts. Here the MWE test.tex:

\usepackage[utf8]{inputenc} %Files are encoded using UTF-8
\usepackage[T1]{fontenc} %The text uses German umlauts
A text with some „ÜÖÄüöäß“.


A text with some „�������“.

This seams to be a bug in the current MikTeX installation (is it a bug of tex4ht or MikTex?).

My current workaround was to copy the file unicode.4hf from C:\Program Files\MiKTeX 2.9\tex4ht\ht-fonts\unicode\charset to C:\Program Files\MiKTeX 2.9\tex4ht\ht-fonts\unicode\charset\uni which solved the problem.

  • 1
    It might be Miktex issue, your code works for me in TeXLive. Note that you make4ht -u test is functionally equivalent to your command.
    – michal.h21
    Aug 3 '16 at 12:55
  • 1
    Imho it is the miktex bug you already found. sourceforge.net/p/miktex/bugs/2350 Aug 3 '16 at 12:59
  • Michal, unfortunately usage of -u option with a more complex tex file and further tex4ht options such as "frames" leads to other problems (no output at all). I am currently trying to find out what the source of the problem is.
    – Mik
    Aug 3 '16 at 13:58
  • that would be clearly bug in make4ht, please try to make an example. there is actually one difference with -u option: it uses -cmozhtf instead of -cunihtf
    – michal.h21
    Aug 3 '16 at 14:29
  • Mihal, I am sorry, the -u option works well - I was using a wrong config file.
    – Mik
    Aug 3 '16 at 14:41

There is indeed a problem with the current MikTeX distribution, see bug report and comments at https://sourceforge.net/p/miktex/bugs/2350/. The bug, which was originally reported by Ulrike Fischer and in the meantime has been marked as closed, still persists.

As mentioned there, the current workaround is copying the file unicode.4hf from C:\Program Files\MiKTeX 2.9\tex4ht\ht-fonts\unicode\charset to C:\Program Files\MiKTeX 2.9\tex4ht\ht-fonts\unicode (or to C:\Program Files\MiKTeX 2.9\tex4ht\ht-fonts\unicode\charset\uni).

If using make4ht with the -u option (as suggested by Michal), make4ht calls tex4ht with -cmozhtf option. Then tex4ht is actually supposed to look for unicode.4hf in ht-fonts/mozilla/charset/ directory but fails to find it there. In this case one should copy unicode.4hf from C:\Program Files\MiKTeX 2.9\tex4ht\ht-fonts\mozilla\charset to C:\Program Files\MiKTeX 2.9\tex4ht\ht-fonts\mozilla.

  • could you please post output from tex4ht command? I mean lines below: Make4ht: tex4ht -cunihtf -utf8 "test.dvi". I am interested in location of unicode.4hf which is listed here
    – michal.h21
    Aug 3 '16 at 15:15
  • Sure: tex4ht.c (2012-07-25-19:36 Windows MiKTeX) tex4ht -cmozhtf -utf8 test (C:/Program Files/MiKTeX 2.9/tex4ht/base/win32/tex4ht.env) (C:/Program Files/MiKTeX 2.9/tex4ht/ht-fonts/unicode/charset/uni/unicode.4hf) (C:/Program Files/MiKTeX 2.9/fonts/tfm/jknappen/ec/ecrm1000.tfm) (C:/Program Files/MiKTeX 2.9/tex4ht/ht-fonts/alias/ec/ec.htf) Searching ´lm-ec.htf' for ´ecrm1000.htf' (C:/Program Files/MiKTeX 2.9/tex4ht/ht-fonts/unicode/lm/lm-ec.htf)
    – Mik
    Aug 3 '16 at 15:32
  • 1
    ah, this is strange, it should be ht-fonts/mozilla/charset/unicode.4hf in your case, not unicode/charset/uni/unicode.4hf. It seems that tex4ht on Miktex can't find the correct file.
    – michal.h21
    Aug 3 '16 at 15:38
  • Yes. and as Ulrike mentioned in sourceforge.net/p/miktex/bugs/2350 without the workaround C:/Program Files/MiKTeX 2.9/tex4ht/ht-fonts/iso8859/1/charset/uni/unicode.4hf)is found instead.
    – Mik
    Aug 3 '16 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.