Powerpoint with unicode characters makes OpenLP crash

Bug #1424972 reported by Tomas Groth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Fix Released
Low
Tomas Groth

Bug Description

The traceback below was reported on the support system. The problem is that if a PPT contains unicode characters we get into problems when we save the slide notes and titles to a text file, because python on windows defaults to encode in cp1252. The fix is to use utf-8 encoding when saving the text files.

*OpenLP Bug Report*Version: {'version': '2.1.2', 'build': None, 'full': '2.1.2'}
--- Details of the Exception. ---

Uploading a presentation file. MS Power Point.

--- Exception Traceback
---Traceback (most recent call last): File
D:\OpenLP_Development\OpenLP_Code\2.1\openlp\core\lib\mediamanageritem.py,
line 321, in on_file_click File
D:\OpenLP_Development\OpenLP_Code\2.1\openlp\core\lib\mediamanageritem.py,
line 377, in validate_and_load File
D:\OpenLP_Development\OpenLP_Code\2.1\openlp\plugins\presentations\lib\mediaitem.py,
line 186, in load_list File
D:\OpenLP_Development\OpenLP_Code\2.1\openlp\plugins\presentations\lib\powerpointcontroller.py,
line 133, in load_presentation File
D:\OpenLP_Development\OpenLP_Code\2.1\openlp\plugins\presentations\lib\powerpointcontroller.py,
line 410, in create_titles_and_notes File
D:\OpenLP_Development\OpenLP_Code\2.1\openlp\plugins\presentations\lib\presentationcontroller.py,
line 335, in save_titles_and_notes File
c:\Python33\lib\encodings\cp1252.py, line 19, in
encodeUnicodeEncodeError: 'charmap' codec can't encode character
'\uf04a' in position 11: character maps to <undefined>

Related branches

Phill (phill-ridout)
Changed in openlp:
importance: Undecided → Low
Tomas Groth (tomasgroth)
Changed in openlp:
assignee: nobody → Tomas Groth (tomasgroth)
status: New → In Progress
Tim Bentley (trb143)
Changed in openlp:
milestone: none → 2.1.4
status: In Progress → Fix Committed
Tim Bentley (trb143)
Changed in openlp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.