Dart Requires Chilkat v11.1.0+
Dart
HTML Encoding
Demonstrates HTML encoding and decoding.Chilkat Dart Downloads
import 'package:chilkat/chilkat.dart';
void main() {
final crypt = CkCrypt2();
var s = '< é ü ç Ω Hello & World ✓ >';
final htmlEncoded = crypt.encodeString(s, 'utf-8', 'html');
print(htmlEncoded);
// Output:
// < é ü ç Ω Hello & World ✓ >
// To decode:
s = crypt.decodeString(htmlEncoded, 'utf-8', 'html');
print(s);
// Output:
// < é ü ç Ω Hello & World ✓ >
}