File: escapes.py

package info (click to toggle)
python3.14 3.14.0~rc1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 126,824 kB
  • sloc: python: 745,274; ansic: 713,752; xml: 31,250; sh: 5,822; cpp: 4,063; makefile: 1,988; objc: 787; lisp: 502; javascript: 136; asm: 75; csh: 12
file content (23 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gettext as _


# Special characters that are always escaped in the POT file
_('"\t\n\r\\')

# All ascii characters 0-31
_('\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n'
  '\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15'
  '\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f')

# All ascii characters 32-126
_(' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  '[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~')

# ascii char 127
_('\x7f')

# some characters in the 128-255 range
_('\x80 \xa0 ÿ')

# some characters >= 256 encoded as 2, 3 and 4 bytes, respectively
_('α ㄱ 𓂀')