.. oe:namespace:: OEIUPAC

.. meta::
   :keywords: OEToUTF8

.. oe:function:: OEToUTF8

   .. oe:language:: c++ java csharp

      .. oe:api::

         std::string OEToUTF8(const char* ptr, const bool remove_markup = true)

   .. oe:language:: python

      .. oe:api:: python

         OEToUTF8(ptr: str, remove_markup: bool = True) -> str

   Convert the string 'ptr', typically the output of the function
   :oe:func:`OEIUPAC::OECreateIUPACName` optionally post-processed by a
   language translation function, from the internal encoding, which
   uses ``\u`` escapes to represent non-ASCII characters, to UTF-8 character
   encoding.

   The 'remove_markup' flag controls the disposition of italics,
   superscript, and subscript markup. If the value is 'true' (the default),
   the markup is removed.  If 'false', the markup is left in the output string,
   which should be post-processed.
