source: proto/charsetcompiler/UTF_encoding.py @ 3711

Last change on this file since 3711 was 3413, checked in by cameron, 6 years ago

Autodetect encoding type

File size: 545 bytes
Line 
1#
2# UTF_encoding.py
3#
4
5class UTF8:
6   name='UTF-8'
7   bits=8
8   mask=0xFF
9
10class UTF16:
11   name='UTF-16'
12   bits=16
13   mask=0xFFFF
14
15class UTF32:
16   name='UTF-32'
17   bits=32
18   mask=0xFFFFFFFF
19
20class UTF_Encoding_Type:
21    def __init__(self, name, bits, mask, default, locked):
22        self.name = name
23        self.bits = bits
24        self.mask = mask
25        self.default = default
26        self.locked = locked
27        self.basis_pattern = []
28        self.encoding_error = False
29    def __str__(self): return self.name
30
31
32Encoding = UTF_Encoding_Type
33
Note: See TracBrowser for help on using the repository browser.