This file is indexed.

/usr/share/pyshared/SCRIBES/EncodingSystem/FileEncodingsMetadata.py is in scribes 0.4~r543-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from SCRIBES.Utils import open_database
from os.path import join
basepath = join("Preferences", "FileEncodings.gdb")

def get_value(uri):
	try:
		encoding = "utf-8"
		database = open_database(basepath, "r")
		encoding = database[str(uri)]
	except KeyError:
		pass
	finally:
		database.close()
	return encoding

def set_value(uri, encoding):
	try:
		database = open_database(basepath, "w")
		database[str(uri)] = encoding
		__remove_utf8_uris(database)
	finally:
		database.close()
	return

def __remove_utf8_uris(database):
	# Remove uris with utf-8 encodings. We don't need them.
	utf8_uris = [uri for uri, encoding in database.iteritems() if encoding =="utf-8"]
	for uri in utf8_uris: del database[str(uri)]
	return