Ticket #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: |
Description
- download mycology at http://users.tkk.fi/~mniemenm/files/befunge/mycology/mycology.zip
- unzip it
- open mycology/mycology.b98 with padre
==> it takes a looooong time to load, and is rendered as utf8 crap
note:
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
comment:1 Changed 4 years ago by jquelin
- Summary changed from padre chokes on file / renders it as utf8 crap to padre chokes on files containing NULL byte (^@)
comment:2 Changed 4 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 4 years ago by jquelin
- Owner set to jquelin
- Status changed from new to accepted
it is a bug in encode::guess, reported upstream
cf https://rt.cpan.org/Ticket/Display.html?id=44523
Note: See
TracTickets for help on using
tickets.

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!