StringTools
DecodeEntities
convert UTF-8 special characters to HTML entities in a string
Calling Sequence
Parameters
Description
Examples
Compatibility
DecodeEntities( s )
s
-
string; Maple string
The DecodeEntities(s) command converts HTML entities in the input string s to UTF-8 characters.
The conversion recognizes named entities like "π" as well as hex and decimal Unicode entities like "π" and "π".
with⁡StringTools:
r≔DecodeEntities⁡π + π + π
r≔π + π + π
convert⁡r,bytes
207,128,32,43,32,207,128,32,43,32,207,128
r≔DecodeEntities⁡エンコード
r≔エンコード
r≔EncodeEntities⁡r:lprint⁡r
"エンコード"
pichar≔DecodeEntities⁡π
pichar≔π
r≔EncodeEntities⁡cat⁡Is ,pichar, > 3.14:lprint⁡r
"Is π > 3.14"
The StringTools[DecodeEntities] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
See Also
StringTools[EncodeEntities]
StringTools[Escape]
Download Help Document