Ticket #3006 (closed enhancement: wontfix)

Opened 11 years ago

Last modified 3 years ago

Unescape, reencode and insert string

Reported by: szaszg Owned by:
Priority: major Milestone:
Component: mcedit Version: master
Keywords: Cc: gotar@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

From time to time I face the fact that I can not insert a literal 0 byte (NUL) into the text. Furthermore extra characters are often difficult to add with the "Insert literal" function, often can only guess which key combination will produce the desired results.

So, this patch provide a new dialog to mceditor.
With this dialog we can insert escaped text that can be reencoded to the "display" codepage.
We can use C-style escapes (e.g.: \t, \027), HTML entities (e.g.: Ä or ·), URL-style escapes (e.g. %20 or %40), Hex-string (e.g. 4865782d) or DOS/Win Numpad-style escapes (e.g. ^32 or ^127). Of course, one at a time of them.
In most of them we can use unicode escapes (\uhhhh, &#ddddd or &#xhhhh, %uhhhh, and ^uhhhh).
We can specify the source encoding, and if it is different from display encoding it converts...
Not only typed text, but files can be inserted into, or you can unescape and reencode the marked block (selection).
Similar to the "Insert File" function, we can insert compressed files as well.

Currently, the key combination "ctrl-w" is assigned to this function, as well as a menu item in the "Format" menu ("Insert escaped string").

Could be a further development to not only be able to unescape text, but to do escape as well.

Attachments

mc.insert_estring.diff (59.7 KB) - added by szaszg 10 years ago.

Change History

comment:1 Changed 11 years ago by gotar

  • Cc gotar@… added

Changed 10 years ago by szaszg

comment:2 Changed 10 years ago by szaszg

Patch updated

comment:3 Changed 3 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone Future Releases deleted

This rarely used task should be implemented as external script or plugin, not in the core.

Note: See TracTickets for help on using tickets.