Fonts & Character SetsProblems to encode an input file

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
gwydion
Posts: 12
Joined: Thu Feb 09, 2012 1:50 pm

Problems to encode an input file

Post by gwydion »

Hi!

I'm working in a bilingual text, so i have the portuguese part in one file, and the english part in the main file. My preamble looks like:

Code: Select all

\documentclass [b5paper, 11pt]{book}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[british]{babel}
However, when I input the portuguese file

Code: Select all

\include{abstractpt.tex}
the portuguese text is encoded wrongly. On the other hand, if I place the portuguese text directly in the main file, it works perfectly.

Any ideas?
Last edited by Stefan Kottwitz on Fri May 04, 2012 9:24 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10397
Joined: Mon Mar 10, 2008 9:44 pm

Problems to encode an input file

Post by Stefan Kottwitz »

It seems you need to convert your Portuguese file to latin1 encoding. Or create a latin1 encoded file and copy and paste the text into it - this would mean the same.

Or completely switch to utf8. It's just important that the real encoding of the file(s) match the option for inputenc.

Stefan
LaTeX.org admin
gwydion
Posts: 12
Joined: Thu Feb 09, 2012 1:50 pm

Re: Problems to encode an input file

Post by gwydion »

Thanks Stefan,

That I did not know at all. Following your tip, I already figured out how to change the file enconding and it solved the issue.

:)
Post Reply