Erd\H{o}s with \mathbb

I am trying to write Erd\H{o}s in a LaTeX file but it gives me an error and says "\mathbb allowed only in math mode." Apparently I use a library that has other plans for \H is there something I can do?

-

Before you load the offending package, put

\let\Horig\H


and then you can say Erd\Horig{o}s

-
You are a genius, it worked!!! – Gil Kalai Feb 13 '12 at 3:03

Unicode to the rescue:

\usepackage{ifxetex,ifluatex}
\ifxetex
\else\ifluatex
\else
% We use inputenc.sty only if we aren't using LuaTeX or XeTeX
\usepackage[utf8]{inputenc}
\fi\fi
% [...]
\begin{document}
[...] Erdős Pál [...]


Of course if you're currently not using UTF-8 for your .tex files, this isn't exactly the easiest solution, but it surely is the one that yields the most readable .tex source and it's not very painful as long as you don't mind copy/paste from, say, Wikipedia for names with "unusual" characters in them.

Unfortunately this doesn't work with bibtex because it is... well... ancient.

-
This won't work for the OP, as ő will still be translated into \H{o} and the problem seems to be due to a redefined \H macro. – egreg Feb 13 '12 at 11:40