[Libreoffice-commits] mso-dumper.git: msodumper/pptrecord.py

Matus Uzak matus.uzak at gmail.com
Wed Apr 27 22:12:28 UTC 2016


 msodumper/pptrecord.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c87f80bdfe44125b10753963b2e66a6ce6e2319b
Author: Matus Uzak <matus.uzak at gmail.com>
Date:   Mon Apr 25 22:15:44 2016 +0200

    pptrecord: TextStyles: Decode UTF-8 string to get correct number of characters stored in TextCharsAtom/TextBytesAtom.

diff --git a/msodumper/pptrecord.py b/msodumper/pptrecord.py
index c1458c8..f9283d4 100644
--- a/msodumper/pptrecord.py
+++ b/msodumper/pptrecord.py
@@ -788,7 +788,7 @@ class TextStyles(BaseRecordHandler):
             self.appendLine("no shape text given, assuming length of 1")
             textLen = 1
         else:
-            textLen = len(self.streamProperties["ShapeText"])
+            textLen = len(self.streamProperties["ShapeText"].decode("UTF-8"))
 
         # 4 bytes: <count> characters of shape text this para run is meant for
         # <para attribs>


More information about the Libreoffice-commits mailing list