Opened 11 years ago

Closed 8 years ago

#224 closed defect (fixed)

padre chokes on files containing NULL byte (^@)

Reported by: jquelin Owned by: jquelin
Priority: major Milestone:
Component: editor Version: 0.25
Keywords: Cc:


  1. download mycology at
  2. unzip it
  3. open mycology/mycology.b98 with padre

==> it takes a looooong time to load, and is rendered as utf8 crap

a) this file is in dos mode. however, converting it to unix with:
$ perl -pi -e 's/\r\n/\n/g' mycology.b98
doesn't change the problem.
b) other files from this archive open nicely
c) it also happens when opening mycology.b98 from an opened padre

Change History (6)

comment:1 Changed 11 years ago by jquelin

  • Summary changed from padre chokes on file / renders it as utf8 crap to padre chokes on files containing NULL byte (^@)

ok, i managed to trim the test case: it happens if you have a null byte within the file. eg, create a file containing:


@ is ctrl+v ctrl+0 in vim, and ctrl+q in emacs (not sure about emacs, it's been too long! :-) )

and look how padre renders it awfully bad!

comment:2 Changed 11 years ago by jquelin

oops, trac messed up the test case: @ should be read as "caret at", or ctrl+0, or null byte.

comment:3 Changed 11 years ago by jquelin

  • Owner set to jquelin
  • Status changed from new to accepted

it is a bug in encode::guess, reported upstream

comment:4 Changed 10 years ago by azawawi

Any update on this one?

comment:5 Changed 10 years ago by jquelin

unfortunately, upstream considers this is not a bug.
since encode does best guess, and it finds an encoding in which the data is valid, it chooses this encoding...

so i don't know exactly what's the best way to handle this bug.

comment:6 Changed 8 years ago by bowtie

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.