byte-order markers are sometimes written at the beginning of file to indicate its character encoding and can be used to pick an appropriate codec to use constant description bom bom_be native byte-order marker for the machine (bom_be or bom_lebig-endian byte-order marker ('\xfe\xff'little-endian byte-order marker ('\xff\xfe'utf- marker ('\xef\xbb\xbf' -bit utf- big-endian marker ('\xfe\xff' -bit utf- little-endian marker ('\xff\xfe' -bit utf- big-endian marker ('\ \ \xfe\xff' -bit utf- little-endian marker ('\xff\xfe\ \ 'bom_le bom_utf bom_utf _be bom_utf _le bom_utf _be bom_utf _le standard encodings the following is list of some of the most commonly used character encodings the encoding name is what you would pass to functions such as open(or lookup(when specifying an encoding full list of encodings can be found by consulting the online documentation for the codecs module (codec name description ascii cp cp latin- iso- - utf- utf- -be utf- -le utf- utf- -be utf- -le utf- -bit ascii characters extended ascii character set from ms-dos extended ascii character set from windows ascii extended with latin characters utf- utf- big-endian utf- little-endian utf- utf- big-endian utf- little-endian utf- notes further use of the codecs module is described in "input and output consult the online documentation for information on how to create new kinds of character encodings great care needs to be taken with the inputs to encode(and decode(operations all encode(operations should be given unicode stringsand all decode(operations should be given byte strings python is not entirely consistent in this regardwhereas python strictly enforces the distinction between strings for examplepython has some codecs that map byte-strings to bytestrings ( the "bz codecthese are unavailable in python and should not be used if you care about compatibility lib fl ff