1

I've tried with:

\documentclass[12pt]{book}
\RequirePackage[T1]{fontenc}%
\usepackage[utf8]{inputenc}%
\DeclareUnicodeCharacter{03EC}{\`{\i}}
\begin{document}

Herman vonì\ Helmholtz

\end{document}

I got the error as Package inputenc Error: Invalid UTF-8 byte sequence.

Please help how to print the character ì directly, I'm using MikTeX V2.9, LaTeX, dvips, and PS2PDF

GowriSaro
  • 540
  • 2
    Works for me with an up-to-date MikTeX installation. I don't even need the \DeclareUnicodeCharacter{03EC}{\{\i}}`. Make sure your system is updated: https://tex.stackexchange.com/q/108447/35864. Are you sure your file is saved correctly as UTF-8 by your editor? – moewe Nov 10 '22 at 05:54
  • 3
    Not really to the point, but the \ after the ì should not be needed here. – moewe Nov 10 '22 at 06:19
  • U+03EC is COPTIC CAPITAL LETTER SHIMA; you want U+00EC, but that's already predeclared. – egreg Nov 10 '22 at 07:56
  • kpsewhich utf8enc.dfu returns the path of the file that provides utf8 support. line 122 is \DeclareUnicodeCharacter{00EC}{@tabacckludge`\i} which shows that backtick+i is already predeclared. U+03EC is something else, like egreg said. – Daniel Diniz Nov 10 '22 at 09:17
  • 1
    @moewe Thanks for your indication about \ – GowriSaro Nov 10 '22 at 12:36

1 Answers1

2

Your posted code runs without error (try copying it back from your question to a new file) but is more complicated than needed, you do not need inputenc or \DeclareUnicodeCharacter or \ (also as mentioned by others in comments you have a typo in the hex value for ì but that will not make an error)

\documentclass[12pt]{book}
\RequirePackage[T1]{fontenc}

\begin{document}

Herman vonì Helmholtz

\end{document}

The error you show means your file is not in UTF-8, most likely, given the script you are using ISO 8859-1 (latin1) so you could add

\usepackage[latin1]{inputenc}

But better would be to save the file as UTF-8 (most editors can do this).

We can not check your encoding as the act of pasting the text to this site converts it to UTF-8, so it is always UTF-8 here.

David Carlisle
  • 757,742