summaryrefslogtreecommitdiff
path: root/scss/cssdefs.py
diff options
context:
space:
mode:
Diffstat (limited to 'scss/cssdefs.py')
-rw-r--r--scss/cssdefs.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/scss/cssdefs.py b/scss/cssdefs.py
index 7b73805..bfd6b19 100644
--- a/scss/cssdefs.py
+++ b/scss/cssdefs.py
@@ -1,3 +1,6 @@
+"""Constants and functions defined by the CSS specification, not specific to
+Sass.
+"""
from math import pi
import re
@@ -339,6 +342,24 @@ def is_builtin_css_function(name):
return False
# ------------------------------------------------------------------------------
+# CSS character set determination
+# Based upon: http://www.w3.org/TR/CSS2/syndata.html#charset
+
+def determine_encoding(f):
+ """Return the appropriate encoding for the given file, according to the CSS
+ charset rules.
+
+ `f` should be a file-like object, opened in binary mode with the cursor at
+ the beginning.
+ """
+ # TODO haha.
+
+ # This is the ultimate default: just assume UTF-8
+ return "UTF-8"
+
+
+
+# ------------------------------------------------------------------------------
# Bits and pieces of grammar, as regexen
SEPARATOR = '\x00'