Today I discovered a problem with the polyglossia package and the g-brief2 class. I hope someone can help me to fix it. :)

Here is my polyglossia MWE (polyg.tex):

\documentclass[a4paper,11pt]{g-brief2}
\usepackage
{%%
    fontspec,
    polyglossia,
    lmodern,
    relsize
}
\setmainlanguage[spelling=new,babelshorthands=true]{german}

\Name               {My Name}
\Unterschrift       {My Name}
\Betreff            {Subject}
\Datum              {\today}
\Anrede             {Dear,}
\Gruss              {Regards,}{0.5cm}

\begin{document}
    \begin{g-brief}
        bla bla bla
    \end{g-brief}
\end{document}

The log for compiling (xelatex polyg.tex) contains the following message:

! Missing control sequence inserted.
<inserted text> 
                \inaccessible 
l.18 ^^I\begin{document}

So, where is the problem? – Best regards and thanks for your assistance!

Article note: *rememberremember!*

I had this problem for a long time, and no one ever proposed a good solution. Recently I got a new answer on my, almost 2 year old, Unix and Linux StackExchange question. This information seems very obscure and so I thought I'd share it, if you too have had this problem and were unable to find this, or at least found finding it hard, consider upvoting the answer.

Problem

You're using a Linux system that you don't have root on, you need to override the DNS of the system. You usually want to do this because you're testing a service (web site) that does not have a proper hostname, but needs one in order to function properly. In the hosting world this comes up often enough.

Solution

You can set the HOSTALIASES environment variable before running your client program. HOSTALIASES is an environment variable that points to a file that is essentially alias value pairs.


$ echo "foo www.google.com" > ~/my_hosts
$ HOSTALIASES=~/my_hosts wget foo
See hostname(7).