I am writing a document in Hungarian which includes the circle symbol for temperature. Later I have to convert the document to docx so I can only use a small subset of latex, for example, without the siunitx package. It is unfortunate that docx will not benefit from the features of magyar babel, but at this stage I would be happy if at least latex would produce a good output.
In an unfortunate case latex makes a bad job and hyphenation, see the minimal example below. Do I do something wrong? Are there good practices I am not following?
\UseRawInputEncoding % https://tex.stackexchange.com/q/446650/
\documentclass[oneside]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\def\magyarOptions{defaults=hu-min} %it is fine without this line, but it is needed
\usepackage[magyar]{babel}
\begin{document}
The problem arises when latex tries to hyphen after the circle sign, $18$ C$^\circ$-ig. In this special case latex put circle two times. The \textbackslash def\textbackslash magyarOptions is required to reproduce this behavior.
\end{document}
The output is:

\SI{18}{\celsius}-ig. – Ulrike Fischer Dec 13 '18 at 14:52