Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r61956:e4110edee543
Date: 2013-03-03 13:11 -0500
http://bitbucket.org/pypy/pypy/changeset/e4110edee543/

Log:    this file was missing from cea544e88241

diff --git a/dotviewer/strunicode.py b/dotviewer/strunicode.py
new file mode 100644
--- /dev/null
+++ b/dotviewer/strunicode.py
@@ -0,0 +1,9 @@
+RAW_ENCODING = "utf-8"
+
+
+def forceunicode(name):
+    return name if isinstance(name, unicode) else name.decode(RAW_ENCODING)
+
+
+def forcestr(name):
+    return name if isinstance(name, str) else name.encode(RAW_ENCODING)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to