0

I need help diagnosing the following unwanted handling of scandinavian letters in WinEdt+MikTeX

System: Windows 7, WinEdt 7.0, MikTeX 2.9

The problem: Scandic letters ä,Ä,ö,Ö won't show correctly in the end product.

The really baffling part: I am working on a multifile project (one chapter per file + a master). Chapters one thru three come out fine with the output matching the input, but in the processing of chapter four the scandic letters get converted to something cryptic.

Here's the header of my master file

\documentclass{report}[12pt]
\usepackage{latexsym,epsf,amsthm}
\usepackage{lmodern}
\usepackage[finnish]{babel}
\usepackage[T1]{fontenc}
\usepackage[dvips]{graphicx}
\usepackage{float}
\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{psfrag}
\usepackage{hyperref}
\usepackage{animate}

You see that I commented out the possibly critical line \usepackage[utf8]{inputenc}. This was suggested in a related question here, and including it solved similar problems with another document yesterday. Now, why did I comment this out here? Here's what happens:

  • without that usepackage command I get the behavior described above
  • with it included I get an error message like

Package inputenc Error: Unicode char \u8:äll not set up for use with LaTeX.

This came when it was processing the word tällä.

But with another document with the header

\documentclass{report}[12pt]
\usepackage[utf8]{inputenc}
\usepackage{latexsym,epsf,amsthm}
\usepackage[finnish]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[dvips]{graphicx}
\usepackage{float}
\usepackage{psfrag}
\usepackage{hyperref}

the line including the utf8 package is absolutely necessary. Keeping it the scandic letters are processed correctly, leaving it out gives similar wrong characters as I get with chapter four above.

Things I have tried:

  • Playing with the Document settings and CP converter settings of WinEdt. This would probably help, IF I knew what I need to set the options to. The autodetection at least occasionally fails. As does setting everything to UTF-8.
  • Such toying with reasonable looking choices now gives me the error message on line 1:

Undefined control sequence \ d o c u m e n t c l a s s { r e p o r t } [ 1 2 p t ]

I swear to God - line 1 looks just normal in the source window!

My theory:

  • The root cause of some of the problems may be that initially I copy/pasted the master file produce on an older laptop (WinEdt 4 and Windows XP). A colleague suggested that WinEdt automatically handles files from older systems as having potentially different character sets.
  • To fix this problem I probably need to figure what is the character set currently in use in my laptop. I need help there, as this isn't MS-DOS any more.

Is there somewhere an explanation for dummies about what is going on here? I could study the on-line help, if I knew what buzzwords to look for. Will it help me in the future, if I create the files for future chapter within the WinEdt IDE with the relevant project open?

  • the "character set" as you call it is not a laptop wide thing but a property of a file. Some of your files are utf8 encoded, other in "ACP" as winedt calls it. You will have to reencode the later. In newer winedt there is a menu entry to reencode to utf8, in older winedt it is normally easier to create a new empty utf8-file and copy the content with copy&paste. – Ulrike Fischer Oct 16 '16 at 12:19
  • Thanks, @UlrikeFischer. I am working along those lines. I tried creating a new master. First I created it (from Windows) as a .txt-file, and copy/pasted the source of the master file there. That misbehaved also, because MikTeX now sees some extraneous characters in the beginning. Then I created a new master file WITHIN WinEdt, and copy/pasted the source of the old master there. That did get rid of some of the problems. I will try creating a new chapter four from within the WinEdt also. – Jyrki Lahtonen Oct 16 '16 at 12:24
1

I suppose the encoding must have been ANSI(Windows 1252). I suggest you download from WinEdt.org macros page ANSI2UTF8 to convert your files (make a backup first, of course).

Also, you should update to WinEdt 10.1, which has many more features than WinEdt 7.

  • Thanks for the suggestions, Bernard. My immediate problem was solved by recreating the master file for the project, leaving out the call to use the UTF-8 package and configuring the files for the individual chapters to ANSI. I am uncertain whether I should accept your answer until I have found the time to test your solution. +1 was there. – Jyrki Lahtonen Oct 17 '16 at 9:14

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.