Support input/output/filesystem encodings (e.g. UTF-8).
-
libbe.util.encoding.get_encoding()
Guess a useful input/output/filesystem encoding... Maybe we need
seperate encodings for input/output and filesystem? Hmm...
-
libbe.util.encoding.get_file_contents(path, mode='r', encoding=None, decode=False)
-
libbe.util.encoding.get_filesystem_encoding()
-
libbe.util.encoding.get_input_encoding()
-
libbe.util.encoding.get_output_encoding()
-
libbe.util.encoding.known_encoding(encoding)
>>> known_encoding("highly-unlikely-encoding")
False
>>> known_encoding(get_encoding())
True
-
libbe.util.encoding.set_file_contents(path, contents, mode='w', encoding=None)