Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcview hex edit: can't enter certain UTF-8 characters #3260

Closed
mc-butler opened this issue Aug 29, 2014 · 8 comments
Closed

mcview hex edit: can't enter certain UTF-8 characters #3260

mc-butler opened this issue Aug 29, 2014 · 8 comments
Assignees
Labels
area: mcview mcview, the built-in text editor prio: low Minor problem or easily worked around
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3260
Reporter egmont (@egmontkob)

mcview, hex edit mode, in a fully UTF-8 environment.

Certain UTF-8 characters (e.g. á é í ó) can properly be entered, they overwrite two bytes.

Certain other UTF-8 characters (e.g. ő Á É Í Ó) only overwrite one byte, the second byte is swallowed.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Aug 30, 2014 at 17:06 UTC (comment 1)

Fix attached.

An is_printable() check was performed for every byte of the UTF-8 which obviously doesn't make sense. This check shouldn't be performed for 8-bit charsets either. If the given byte can arrive as input, the file should be modified accordingly. Updating the display should be another story, taking care of replacing non-printable characters.

The right-hand column is not updated properly, "printable" bytes are replaced by spaces, "non printable" bytes are replaced by dots. This is another problem, sounds like #3259.

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Aug 30, 2014 at 21:01 UTC

Fix

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Aug 30, 2014 at 21:02 UTC (comment 2)

Patch updated. The TAB key shouldn't be accepted as literal, to allow moving back to the hexview area.

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Feb 13, 2015 at 21:15 UTC (comment 3)

Friendly ping... a patch has been attached for 6 months now. Could you please take a look? It would be nice to release this fix along with the mcviewer rewrite.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 17, 2015 at 10:59 UTC (comment 4)

  • Owner set to andrew_b
  • Milestone changed from Future Releases to 4.8.14
  • Status changed from new to accepted
  • Branch state changed from no branch to on review

Thanks!

Branch: 3260_hexedit_utf8_input
[f0ab29b]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 17, 2015 at 10:59 UTC (comment 5)

  • Votes set to andrew_b
  • Branch state changed from on review to approved

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 17, 2015 at 11:00 UTC (comment 6)

  • Votes changed from andrew_b to committed-master
  • Branch state changed from approved to merged
  • Status changed from accepted to testing
  • Resolution set to fixed

Merged to master: [f0ab29b].

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 17, 2015 at 11:02 UTC (comment 7)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: mcview mcview, the built-in text editor prio: low Minor problem or easily worked around
Development

No branches or pull requests

2 participants