2

I found this: Typesetting any language, Vietnamese for example

But when I try to do the same, there are no accent. So I tried to investigate a bit and I found out this: When I copy-paste the Vietnamese text in the topic, the result is correct but when I retype the same text with my own keyboard (in Vietnamese mode), I do not have accents. So I suppose that the problem comes from the encoding but I can't find where the problem is.

I also noticed that i have the good result only if i put this line before: \usepackage[T5]{fontenc}

I use TexnicCenter on Windows. On my laptop, I use TexWorks.

ex:

\documentclass[a4paper]{report}

\usepackage[utf8]{inputenc}
\usepackage[vietnam]{babel}
\usepackage[T5]{fontenc}

\begin{document}

\chapter{Lesson 1}

%The first text is typed with my keyboard in vietnamese mode
Hà Nội là thủ đô, đồng thời la thành phố đưng đâu Việt Nam về diện
tích tự nhiên va đứng thứ hai về diện tích đô thị sau thành phố Hồ Chí
Minh, nó cũng đứng thứ hai về dân số với 6.913.161 người

%The second text is just a copy-paste of the web and give a good result.
\noindent
Hà Nội là thủ đô, đồng thời là thành phố đứng đầu Việt Nam về diện
tích tự nhiên và đứng thứ hai về diện tích đô thị sau thành phố Hồ Chí
Minh, nó cũng đứng thứ hai về dân số với 6.913.161 người

\end{document}

Sorry for my english. I hope my question was understandable. Thanks,

Mickael

closed as off-topic by Johannes_B, user31729, Mensch, Paul Gessler, barbara beeton Mar 2 '15 at 17:37

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Welcome to TeX.SX! The keyboard input uses combining characters, which are not understood by pdflatex: the in the first paragraph is input as U+1ECD U+0302, while in the second paragraph it is U+1ED9. If I look at them with a hex editor, I see <C3><B4><CC><A3> for the first and <E1><BB><99> for the second. What text editor are you using? – egreg Oct 18 '13 at 12:29
  • Then if pdfLateX dont understand combining characters, how can I type in vietnamese with an ordinary keyboard? – Mickael Oct 18 '13 at 15:18
  • This depends on the keyboard and the editor, I'm afraid. I'm no expert in how Windows does this, sorry. – egreg Oct 18 '13 at 15:22
  • 1
    Mickael typingvietnamese.blogspot.com/p/… – doed Nov 20 '13 at 12:58
  • 4
    I'm voting to close this question as off-topic because the cause of behaviour is faulty input, which depends on the texteditor in use and the operating system. The question How to type vietnamese charackters is off-topic here. – Johannes_B Mar 2 '15 at 17:03

Browse other questions tagged or ask your own question.