source: proto/charsetcompiler/UTF_encoding.py @ 3949

Last change on this file since 3949 was 3949, checked in by cameron, 5 years ago

Add CanonicalCharSetDef? constructor, default UTF-8 basis pattern

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