.. oe:namespace:: OEIUPAC

.. meta::
   :keywords: OEToASCII

.. oe:function:: OEToASCII

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

      .. oe:api::

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

   .. oe:language:: python

      .. oe:api:: python

         OEToASCII(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, into a reduced
   7-bit ASCII representation by mapping accented 8-bit characters into their
   ASCII counterparts.

   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.
