EncodeEntities - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


StringTools

  

EncodeEntities

  

convert UTF-8 special characters to HTML entities in a string

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

EncodeEntities( s )

Parameters

s

-

string; Maple string

Description

• 

The EncodeEntities(s) command converts UTF-8 special characters in the input string s to HTML entities.

• 

The conversion always uses the hex code form of an entity even when a named entity exists. For example, the pi character will be converted to "π" rather than "π". The form argument defaults to xml, which specifies

• 

This command only deals with UTF-8 to Unicode conversions, and does not look at escaping one-byte characters like angle brackets. The StringTools:-Escape command handles this conversion if needed.

Examples

withStringTools:

rDecodeEntitiesエンコード

rエンコード

(1)

rEncodeEntitiesr:lprintr

"エンコード"

picharDecodeEntitiesπ

picharπ

(2)

rEncodeEntitiescatIs ,pichar, > 3.14:lprintr

"Is π > 3.14"

Compatibility

• 

The StringTools[EncodeEntities] command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

StringTools

StringTools[DecodeEntities]

StringTools[Escape]