File: encoding.jq

package info (click to toggle)
fq 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 106,624 kB
  • sloc: xml: 2,835; makefile: 250; sh: 241; exp: 57; ansic: 21
file content (21 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
def to_iso8859_1: _to_strencoding({encoding: "ISO8859_1"});
def from_iso8859_1: _from_strencoding({encoding: "ISO8859_1"});
def to_utf8: _to_strencoding({encoding: "UTF8"});
def from_utf8: _from_strencoding({encoding: "UTF8"});
def to_utf16: _to_strencoding({encoding: "UTF16"});
def from_utf16: _from_strencoding({encoding: "UTF16"});
def to_utf16le: _to_strencoding({encoding: "UTF16LE"});
def from_utf16le: _from_strencoding({encoding: "UTF16LE"});
def to_utf16be: _to_strencoding({encoding: "UTF16BE"});
def from_utf16be: _from_strencoding({encoding: "UTF16BE"});

def from_base64($opts): _from_base64({encoding: "std"} + $opts);
def from_base64: _from_base64(null);
def to_base64($opts): _to_base64({encoding: "std"} + $opts);
def to_base64: _to_base64(null);

# TODO: compat: remove at some point
def hex: _binary_or_orig(to_hex; from_hex);
def base64: _binary_or_orig(to_base64; from_base64);
def tohex: to_hex;
def fromhex: from_hex;