Before voting for close as duplicate please ensure that it does actually answer my particular question here. Questions may look similar, but I haven't found an answer for mine. Thank you.
I am looking for a way to convert arbitrary scalar character into its HTML encoded form. I do not want just encode <, ", etc. but whole text.
So the text of form
"<abc at def.gh>"
be encoded as
"<abc at def.gh>"
My goal is compatibility to how CRAN encodes maintainers email addresses.
So the < should not be a < but it should be <. Similarly . should not be . but it should be ..
To see it on CRAN you can visit CRAN page of any package, i.e. https://cran.r-project.org/package=curl, then "view source" and find Maintainer field there.
I am looking for a lightweight solution that will require as few dependencies as possible, it doesn't have to be fast.
For reference, an online tool to decode encoded string: https://onlineasciitools.com/convert-html-entities-to-ascii