File: Utils.py

package info (click to toggle)
scribes 0.4~r543-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 6,836 kB
  • ctags: 6,779
  • sloc: python: 32,963; perl: 2,747; xml: 2,233; sh: 847; makefile: 597
file content (4 lines) | stat: -rw-r--r-- 179 bytes parent folder | download
1
2
3
4
def format_encoding(encoding):
	utf8_encodings = ("utf-8", "utf8", "UTF8", "UTF-8", "Utf-8", None)
	if encoding in utf8_encodings: return "utf-8"
	return encoding.strip().lower()