Commits

Jakub Wilk committed 3d5fe4f

hocr-merge: fix UAX#29.

Comments (0)

Files changed (1)

misc/xhocr/hocr.py

         if lang:
             lang = bcp47.LanguageTag.from_tesseract(lang)
             if self.options.uax29:
-                locale = uax29.Locale(lang)
+                locale = lang.get_locale()
             if self.options.fix_lang:
                 max_element.set('lang', str(lang))
         elif self.options.uax29: