posix: in read, count length of converted data, fixes #178
diff --git a/serial/serialposix.py b/serial/serialposix.py
index 01848e9..980430c 100644
--- a/serial/serialposix.py
+++ b/serial/serialposix.py
@@ -555,7 +555,7 @@
                 # still calculate and check timeout
                 if timeout.expired():
                     raise writeTimeoutError
-        return len(data)
+        return len(d)
 
     def flush(self):
         """\