0

Currently I do the following in PHP to convert from UTF-8 to ASCII, but with the UTF-8 characters as HTML encoded. For instance, the German ß character would be converted to ß.

$sData = mb_convert_encoding($sData, 'HTML-ENTITIES','UTF-8');

In GCC C++ on Linux, what is the equivalent way to do this?

Actually, I can also take an alternative form like, instead of ß, the &#xNNN; format will do.

6
  • There's no such standard function in C++. You'll need some library that speaks HTML. Commented Sep 19, 2013 at 18:36
  • @Volomike: Deleted that comment. Commented Sep 19, 2013 at 18:37
  • @KerrekSB Perhaps someone knows of a class or function that's shared on the web for this. A hyperlink to that would help me. Commented Sep 19, 2013 at 18:37
  • Do you actually need ß or will &#xNNN; do? Commented Sep 19, 2013 at 18:40
  • @MatsPetersson &#xNNN; will do. I'll revise my post. Commented Sep 19, 2013 at 18:43

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.