-
Notifications
You must be signed in to change notification settings - Fork 0
usage
- Select the text of an entity
Plugins > HTML Tag > Decode entities
- Select the text of a Unicode escape character
Plugins > HTML Tag > Decode JS
Example
Tip
Commands triggered by keyboard shortcut will always decode as you type; you do not need to activate automatic decoding. Just position the caret after the target text and execute one of the commands mentioned below.
- Select
Automatically decode entities
fromPlugins > HTML Tag
- Type an entity
- Either:
- Press SPACE or ENTER, or,
- Press the shortcut for the
Decode entities
command
Example
- Select
Automatically decode Unicode characters
fromPlugins > HTML Tag
- Type a Unicode escape character
- Either:
- Press SPACE or ENTER, or,
- Press the shortcut for the
Decode JS
command
Example
- Select
Plugins > HTML Tag > About
and click “Configure” below the heading that shows the current Unicode character format - Modify the escape character prefix
- Select or type a Unicode escape character in the format you specified
Example
Note
The prefix will be converted to a regular expression pattern before searching the document. Each of the following characters will be escaped by the plugin, so you can enter them literally (with no preceding \
): .
, *
, +
, ?
, ^
, $
, {
, }
, (
, )
, [
, ]
, |
.
Important
There is one exception to the above. To use a single backlash as prefix (i.e., \0000
), you need to escape the prefix character like this: \\
, i.e., enter \
twice.
Exactly as above; see here , here, here and here.
Older versions (Html Tag <= 1.4.4)
HTML Tag represents Unicode text in UTF-16 encoding. This is the same encoding traditionally used by the Windows operating system, and hence by Notepad++.
A single code point in a UTF-16 string can have a maximum value of 0xFFFF, or 16 consecutive 1 bits. Code points above 0xFFFF can still be represented, using two code points that, taken together, form a surrogate pair.
As an example:
- Make sure HTML Tag is at least version 1.4
- Paste this emoji into a new buffer: 🍪 (
U+1F36A
) - Select the emoji and run the
Encode JS
command; the cookie will be broken into the escape characters\uD83C\uDF6A
- Select all the text, run the
Decode JS
command, and confirm that the cookie appears again
To decode any Unicode character between U+010000
and U+10FFFF
, you will need to:
- Find the “high” and “low” surrogate for the character. You can use an online tool, or implement an algorithm in the programming language of your choice
- Type or paste the high surrogate, followed by the low surrogate, both in your preferred escape character format
- Run the
Decode JS
command after selecting the pair, or after placing the caret beside them
- Select:
- the entire element (tags and child elements):
Plugins > HTML Tag > Select tag and contents
, or, -
only the child elements:
Plugins > HTML Tag > Select tag contents only
- the entire element (tags and child elements):
- Copy/Cut the selection
Example
Exactly as above.
Example
Note
Since plugin version 1.4.1, folded sections will also be expanded by any of the ...tag
commands.
In older versions, the selection range is the same, but remains folded.
Return to wiki homepage.