Ticket #2180 (new defect)

Opened 15 years ago

Last modified 10 years ago

Screen output can't handle non-printable characters

Reported by: gotar Owned by:
Priority: major Milestone: Future Releases
Component: mcdiff Version: master
Keywords: Cc: zaytsev
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Comparing random binary files (or text files with not-LC_CTYPEd nor translated encoding) leads to garbages. It seems like there's no is_printable() checks or some are missing.

Attachments

mcdiff.png (53.9 KB) - added by gotar 15 years ago.

Change History

Changed 15 years ago by gotar

comment:1 Changed 15 years ago by angel_il

mcdiff not for compare binary data

comment:2 Changed 15 years ago by gotar

"or text files with not-LC_CTYPEd nor translated encoding"

Read carefully please. The same happens for UTF-8 files when I'm using ISO-8859-2 - in such case ctrl-E and choosing manually UTF-8 fixes the output. Comparing binary files is just the fastest way to show where the problem resides.

comment:3 Changed 15 years ago by angel_il

"or text files with not-LC_CTYPEd nor translated encoding"

ok :)

comment:4 Changed 15 years ago by zaytsev

Same issue as in #1668, isn't it?

comment:5 Changed 15 years ago by zaytsev

  • Cc zaytsev added

comment:6 Changed 14 years ago by gotar

Nope, it's not the same as #1668 - like I've noticed in #2502 it's related to '<MN>' hex representation of non-printable characters which causes expanding lines, but apparently they're not recalculated and put too wide directly on screen.

comment:7 Changed 14 years ago by angel_il

so, i known about this bug... but 1) mcdiff not for HEX compare, 2) i'm so lazy for fix it...

comment:8 follow-up: ↓ 10 Changed 14 years ago by angel_il

2gotar: you really have troubles with this behavior of the mcdiff?

comment:9 Changed 14 years ago by angel_il

  • Version changed from version not selected to master
  • Milestone changed from 4.7 to 4.8

comment:10 in reply to: ↑ 8 Changed 14 years ago by gotar

Replying to angel_il:

2gotar: you really have troubles with this behavior of the mcdiff?

Not at all, it only badly wraps on screen, so doesn't corrupt it (unlike #1668 which is real PITA, I wonder why it's still not fixed upstream).
But this shows that some parts of code that could be common are not; mcview handles output (almost) properly, but lacks color support (#1849), two-panel viewer was requested somewhere here too AFAIR.

comment:11 Changed 14 years ago by andrew_b

Related to #2162.

comment:12 Changed 10 years ago by andrew_b

  • Cc changed from zaytsev, to zaytsev
  • Branch state set to no branch
  • Milestone changed from 4.8 to Future Releases
Note: See TracTickets for help on using tickets.