Opened 6 years ago

#16328 new defect

wxRichTextCtrl : encoding problem when importing files generated from previous versions of wxWidgets

Reported by: briceandre Owned by:
Priority: normal Milestone:
Component: wxRichText Version: 3.0.0
Keywords: Cc:
Blocked By: Blocking:
Patch: yes

Description

Dear all,

I found a problem when importing in last version of wxWidgets (unicode build) wxRichText files recorded from previous versions of wxWidgets compiled with other encodings (in my case, wxWidgets 2.8.11, in ansi build).

The problem comes from the fact that old versions of wxWidgets encode characters with accents (for example é), with tag symbol (for example <symbol>-29</symbol>) with, in the tag, the integer corresponding to the encoded character, in the encoding used by wxWidgets.

But, when decoding the character, no check is performed on the encoding used for it.

I wrote a small patch that, in my case, solves the problem, but I am not sure it works in all possible configuration.

Regards,

Brice

Attachments (1)

proposal.patch download (9.4 KB) - added by briceandre 6 years ago.
proposed patch

Download all attachments as: .zip

Change History (1)

Changed 6 years ago by briceandre

proposed patch

Note: See TracTickets for help on using tickets.