Convert HTML entities in a String to their corresponding characters.
Syntax
Parameters
subject - The String to convert.quotes - How to convert quotes.0 - Leave quotes unconverted.1 - Convert single-quotes and leave double-quotes unconverted.2 (default) - Convert double-quotes and leave single-quotes unconverted.3 - Convert single-quotes and double-quotes.all - Whether to convert all possible characters.false - Only ampersands (&), single-quotes (&039;), double-quotes ("), less than (<), and greater than (>) are converted.true (default) - All HTML entities are converted.charset - The character set used in the conversion. The default is ISO-8859-1.
Result
Returns subject with HTML entities converted to their equivalent characters.
| Charset | Aliases | Description |
|---|---|---|
| ISO-8859-1 | ISO8859-1 | Western European, Latin-1 |
| ISO-8859-15 | ISO8859-15 | Western European, Latin-9. Adds the Euro sign, French and Finnish letters missing in Latin-1(ISO-8859-1) |
| UTF-8 | ASCII compatible multi-byte 8-bit Unicode | |
| cp866 | ibm866, 866 | DOS-specific Cyrillic charset |
| cp1251 | Windows-1251, win-1251, 1251 | Windows-specific Cyrillic charset |
| cp1252 | Windows-1252, 1252 | Windows specific charset for Western European |
| KOI8-R | koi8-ru, koi8r | Russian |
| BIG5 950 | Traditional Chinese, mainly used in Taiwan | |
| GB2312 | 936 | Simplified Chinese, national standard character set |
| BIG5-HKSCS | Big5 with Hong Kong extensions, Traditional Chinese | |
| Shift_JIS | SJIS, 932 | Japanese |
| EUC-JP | EUCJP | Japanese |