"Never ever use non-ASCII characters and spaces in your filenames. Never!"
That's what I'm telling my students for years. But if for any reasons there is an urgent need to include an image file with umlauts in its filename, the grffile package could be used.
Unfortunately, I was not able to get the following example compiled:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage[extendedchars]{grffile}
\begin{document}
\includegraphics{Bäckerstraße}
\end{document}
I'm using MiKTeX (recently updated) upon Windows 7. My MWE is saved in Cp1252 Windows encoding. The same is valid for the existing file Bäckerstraße.png on my file system.
I compiled with pdflatex. The compilation produces no PDF output with no error message in the log file. The compilations stops with an error message in the command shell:
pdflatex: Windows API error 1113: F��r das Unicode-Zeichen ist kein zugeordnetes Zeichen in der Mehrbytecodepage vorhanden.
I googled for this problem and found some forum discussion from 2011 and 2012 indicating that this could be a general pdflatex problem using MiKTeX.
I'm asking, if there is just a dumb error of mine inside the MWE code or if there is just no chance to run this with MiKTeX.
If there is an error in the MWE, please, let me know how to correct it. But if this cannot run at all, please, stop me wasting time trying.
latin1. I have to use\usepackage[encoding,filenameencoding=utf-8]{grffile}. I thought that UTF-8 filename encoding would be wrong for Windows, but this option setting works. – Thomas F. Sturm Nov 23 '14 at 11:52