3

I'm trying to write an article in English with some Norwegian names in it, both in the article itself as well as in the bibliography (bibtex).

Strangely, I don't get the display of the Norwegian letters right.

When I use:

\usepackage[T1]{fontenc}

\usepackage[utf8]{inputenc}

%\usepackage[norsk]{babel}

I get the letters right in the text but not in bibliography.

When I use

\usepackage[T1]{fontenc}

\usepackage[latin1]{inputenc}

%\usepackage[norsk]{babel}

the letters are correctly dispayed in the bibliography but not in article text. The use of \usepackage[norsk]{babel} does not seem to help in either case.

I can remember having used only

\usepackage[T1]{fontenc}

\usepackage[latin1]{inputenc}

once which had worked fine so I really cannot explain these strange results...

I'm using windows 7, MiKTeX 2.9 and TeXnic Center 2.0 beta.

Any suggestions what might be wrong or what I should check?

Aki
  • 351
  • 4
    when you changed to \usepackage[latin1]{inputenc} did you also re-encode your document to latin1 from utf-8? But anyway better probably is to use and declare utf-8 but use traditional ascii markup in the bib file so {\"o} etc rather than using the letter directly. – David Carlisle Dec 19 '14 at 10:23
  • 3
    You've tagged the posting with "biblatex", but in the first paragraph of your posting you state that you use "bibtex". Which program do you use? (bibtex and biblatex are not synonyms.) If you use bibtex, do check out the posting How to write “ä” and other umlauts and accented letters in bibliography? – Mico Dec 19 '14 at 10:29
  • 1
    You can use bibtex8 instead of bibtex. bibtex8 provides support for unicode characters. – Guido Dec 19 '14 at 10:54
  • @DavidCarlisle: Thank you very much! Both solutions work fine. 1) encoding the document in latin1 or 2) using ascii markup of Norwegian letters in bibliography and utf-8 encoding. – Aki Dec 19 '14 at 10:56
  • @Mico: Sorry for that. I use bibtex ;) – Aki Dec 19 '14 at 10:56
  • @Aki: biber understands utf8, so you can type norwegian letters directly (ask JabRef to save the .bib file in utf8 encoding). – Bernard Dec 19 '14 at 12:52
  • @Guido - A minor point: bibtex8 can handle 8-bit (1 byte) encoded characters (which suffices for most languages of European origin), but not "real" Unicode-based encodings (such as utf8, which encodes characters using up to 4 bytes of data). There is a program called bibtexu, but I've never used it and don't know how stable and reliable it is. – Mico Dec 20 '14 at 07:28

1 Answers1

5

When you changed to

\usepackage[latin1]{inputenc}

You also need to re-encode your document to latin1 from utf-8.

But anyway better probably is to use and declare utf-8 but use traditional ascii markup in the bib file so {\"o} etc rather than using the letter directly, then the bib file is independent of the encoding used in the document, and can be used unchanged with documents with different encodings.

David Carlisle
  • 757,742