to be used for of-wire port name etc.
Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/lib/stringify.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/ryu/lib/stringify.py b/ryu/lib/stringify.py
index a575e8e..a88cc22 100644
--- a/ryu/lib/stringify.py
+++ b/ryu/lib/stringify.py
@@ -60,8 +60,19 @@ class AsciiStringType(TypeDescr):
return v.encode('ascii')
+class Utf8StringType(TypeDescr):
+ @staticmethod
+ def encode(v):
+ return unicode(v, 'utf-8')
+
+ @staticmethod
+ def decode(v):
+ return v.encode('utf-8')
+
+
_types = {
'ascii': AsciiStringType,
+ 'utf-8': Utf8StringType,
}
--
1.8.3.1
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel