npp-plugins / converter

Other
37 stars 15 forks source link

Conversion from hex 200b to ASCII appears broken #14

Closed zedgama3 closed 1 year ago

zedgama3 commented 1 year ago

Steps to reproduce:

  1. Open the conversion panel using Plugins -> Converter -> Conversion Panel
  2. Enter a hexadecimal value of 200b
  3. Click copy or insert for ASCII

Expected result

That a ZERO LENGTH SPACE would be copied into the clipboard when Copy was clicked or inserted into the document when Insert was clicked.

Actual result

Nothing.

The clipboard maintains previous contents and no new characters are added to the document.

user21760 commented 1 year ago

The character ZLSP is not included in ASCII. The panel works for Unicode codepoints from 00 to FF, which includes all the ASCII characters with the same codepoints (from 00 to 7F). A codepoint with hexadecimal value 200B would mean 2 characters in ASCII : space (hex 20) followed by [VT] (hex 0B: vertical tabulation).

You would need a feature for hex to unicode conversion, like the one requested in this issue: #7

zedgama3 commented 1 year ago

Good catch. I should have looked more closely. Thank you for your response.