import { utf8Encode } from '@src/hylo-components/utils/usefull/usefull';
Encodes multi-byte Unicode string into utf-8 multiple single-byte characters (BMP / basic multilingual plane only).
Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars.
Can be achieved in JavaScript by unescape(encodeURIComponent(str)), but this approach may be useful in other languages.
Unicode string to be encoded as UTF-8
Generated using TypeDoc
import { utf8Encode } from '@src/hylo-components/utils/usefull/usefull';
Encodes multi-byte Unicode string into utf-8 multiple single-byte characters (BMP / basic multilingual plane only).
Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars.
Can be achieved in JavaScript by unescape(encodeURIComponent(str)), but this approach may be useful in other languages.