Ticket #304 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

padre chokes plain text files with non-ascii characters

Reported by: jquelin Owned by:
Priority: major Milestone:
Component: editor Version: 0.34
Keywords: Cc: cm@…

Description

  1. open padre, create an empty file.
  2. type in non-ascii chars (cf attached file)
  3. save
  4. padre issues warnings:

"\x{00e7}" does not map to ascii at /home/jquelin/prog/padre/Padre/lib/Padre/Wx/Main.pm line 1678.
"\x{00e9}" does not map to ascii at /home/jquelin/prog/padre/Padre/lib/Padre/Wx/Main.pm line 1678.
"\x{00e9}" does not map to ascii at /home/jquelin/prog/padre/Padre/lib/Padre/Wx/Main.pm line 1678.

  1. close padre
  2. reopen padre with the new file just created
  3. see the content of the file now reading:

fan\x{00e7}ais \x{00e9}cossas et \x{00e9}conmie

instead of:

fançais écossas et éconmie

that's not good...

Attachments

spell (48 bytes) - added by jquelin 5 years ago.

Change History

Changed 5 years ago by jquelin

comment:1 Changed 5 years ago by jquelin

note that the problem seems to be in the saving, since opening the created file with vim shows the \x{...} codes.

comment:2 Changed 5 years ago by therek

  • Cc cm@… added

It seems to work fine both on my FreeBSD and Linux boxes, although, current line background color for the UTF-8 test file is changed to default (I use different color for this).

comment:3 Changed 5 years ago by therek

Alright. It turned out that the default current line background color was not set up for all text/plain files (fixed in r4271).

Which leaves me with no trace of any problems with non-ASCII files in my environment.

comment:4 Changed 5 years ago by szabgab

  • Status changed from new to closed
  • Resolution set to fixed

starting from r5769 we automatically upgrade ascii files to utf-8 on save when we detect wide characters.

Note: See TracTickets for help on using tickets.