From ff55be8a8720026d5582a6549fadb308c31b124c Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Fri, 20 Nov 2009 10:37:05 +0000 Subject: [PATCH] correct len() of item to convert from utf-8 first git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@303 e5f2f494-b856-4b98-b285-d166d9295462 --- src/lib/cc/python/ISC/CC/Message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/cc/python/ISC/CC/Message.py b/src/lib/cc/python/ISC/CC/Message.py index 059cbde773..6210742d29 100644 --- a/src/lib/cc/python/ISC/CC/Message.py +++ b/src/lib/cc/python/ISC/CC/Message.py @@ -44,7 +44,7 @@ def _encode_tag(tag): """Encode a single UTF-8 tag. ... wire_partial = Message._encode_tag('this') """ - return(struct.pack(">B", len(tag)) + bytearray(tag, 'utf-8')) + return(struct.pack(">B", len(bytearray(tag, 'utf-8'))) + bytearray(tag, 'utf-8')) def _encode_length_and_type(data, datatype): """Helper method to handle the length encoding in one place."""