How to decode HTML Entities in C?

后端 未结 5 1441
广开言路
广开言路 2020-11-30 11:29

I\'m interested in unescaping text for example: \ maps to \\ in C. Does anyone know of a good library?

As reference the Wikipedia

5条回答
  •  情歌与酒
    2020-11-30 11:51

    For another open source reference in C to decoding these HTML entities you can check out the command line utility uni2ascii/ascii2uni. The relevant files are enttbl.{c,h} for entity lookup and putu8.c which down converts from UTF32 to UTF8.

    uni2ascii

提交回复
热议问题