2

I am trying to use non-english characters to work in memoir for a book I wrote. It is science fiction and I am 'making up' an alien language. While I am no linguist, this is only for a few sort sentences until the technology takes over. The problem is while I have ĵÊÄ¡£ÄãÇÕãl£¿¬FÚÔ for example. It looks fine until processed though LaTex. Then everything becomes ???? ??? ?????. Packages I am currently using are:

\usepackage{palatino}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{textcomp}
\usepackage{nextpage}

I added

\usepackage[utf8x]{inputenc}

to the preamble. Then the characters appear properly in the source .tex document when viewed in TexStudio but when processed to PDF I get a lot of "unknown character" errors and "malformed UTF-8 sequence". And the characters are either omitted or converted to ???? ??? ???????.

On another note 50.0441° N doesn't display properly either. I thought that was included with \usepackage[utf8x]{inputenc}?

1

2 Answers 2

2

There are a few issues with your setup.

  1. You need the T1 encoding
  2. You need the textcomp package
  3. The palatino package is obsolete
  4. The utf8x option is not recommended.
\documentclass{memoir}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage{mathpazo}

\begin{document}

ĵÊÄ¡£ÄãÇÕãl£¿¬FÚÔ

50.0441° N

\end{document}

enter image description here

1
  • Thanks for the help, but adding \usepackage[T1]{fontenc} and changing to \usepackage{mathpazo} I still have the same issue (and now even worse since the last comment I posted below when I didn't make any changes to the file). Ah well, I guess unicode isn't worth the trouble considering I only have a few lines of it in the book. While I like the look, Tex doesn't seem to. May 10, 2016 at 19:33
1

The following seems to work:

\documentclass{memoir}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc} % <-- new
\usepackage{palatino}
\begin{document}
ĵÊÄ¡£ÄãÇÕãl£¿¬FÚÔ

50.0441° N
\end{document}

Addendum: Instead of the using the nearly obsolete palatino package, you may want to consider loading the more recent newpxtext and newpxmath packages. If you do so, you can get by with using the utf8 font encoding system. (As before, you still need to load the fontenc package with the option T1.)

enter image description here

\documentclass{memoir}
\usepackage[utf8]{inputenc}  % <-- note: utf8 instead of utf8x
\usepackage[T1]{fontenc} 
\usepackage{newpxtext,newpxmath}
\begin{document}
ĵÊÄ¡£ÄãÇÕãl£¿¬FÚÔ

50.0441° N
\end{document}
3
  • Interesting, I added \usepackage[T1]{fontenc} but still get "utfx error: character 176 seems alone" for line 628 that contains 50.0441° N and "ucs: Unknown Unicode character 867 = U+0363,(ucs) possibly declared in uni-3.def". I then used my preamble, but only the lines in question after \begin{document} And it works fine then. I don't get it. Unless it has to do with \widowpenalty=3500 \clubpenalty=300 \sloppy \hyphenpenalty=10000 \tolerance=1500 \checkandfixthelayout that cause a problem after 600 or so lines. May 4, 2016 at 23:33
  • Ok, now I am really stumped. I left everything for a few days then when loaded the same .tex file I am getting the same errors of course, but now � characters in the code and before I was at least getting the unicode characters in the code view after enabling T1 encoding and I didn't change a thing since my last comment. And same as before I get a lot of [U+FFFD] (for example) in the PDF after compile. I now tried \usepackage{newpxtext,newpxmath} removing palatino and same issue. Thanks for the help but I guess I will remove the unicode as it is more trouble than it is worth. May 10, 2016 at 19:27
  • @DarthNewton - Hmmm, I'm stumped too. Do feel free to post a new query, preferably with a compilable MWE (minimum working example) that generates the problems that you'd like to fix.
    – Mico
    May 10, 2016 at 19:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .