diff options
Diffstat (limited to 'tests/farm/html/src/bom.py')
-rw-r--r-- | tests/farm/html/src/bom.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/farm/html/src/bom.py b/tests/farm/html/src/bom.py new file mode 100644 index 0000000..2db8b71 --- /dev/null +++ b/tests/farm/html/src/bom.py @@ -0,0 +1,11 @@ +# A python source file in utf-8, with BOM
+math = "3×4 = 12, ÷2 = 6±0"
+ +import sys
+
+if sys.version_info >= (3, 0):
+ assert len(math) == 18
+ assert len(math.encode('utf-8')) == 21
+else:
+ assert len(math) == 21
+ assert len(math.decode('utf-8')) == 18
|