We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f075d0f commit ca18ae0Copy full SHA for ca18ae0
1 file changed
ciscosparkapi/helperfunc.py
@@ -0,0 +1,10 @@
1
+"""Package helper functions."""
2
+
3
4
+def utf8(string):
5
+ """Return the 'string' as a UTF-8 unicode encoded string."""
6
+ assert isinstance(string, basestring)
7
+ if isinstance(string, unicode):
8
+ return string
9
+ elif isinstance(string, str):
10
+ return unicode(string, encoding='utf-8')
0 commit comments