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

Special characters in macros are recorded incorrectly #13757

Closed
BernieStn opened this issue Jun 9, 2023 · 7 comments
Closed

Special characters in macros are recorded incorrectly #13757

BernieStn opened this issue Jun 9, 2023 · 7 comments

Comments

@BernieStn
Copy link

BernieStn commented Jun 9, 2023

Description of the Issue

Special characters in macros are recorded incorrectly. Recording german ä, ö, ü, and ß resulted in unexpected result when executing the macro.

Steps to Reproduce the Issue

  1. Start Notepad++
  2. Record a new macro
  3. Enter the following: ä ö ü ß
  4. Stop recording the macro
  5. Save the macro and assign a name to the macro
  6. Execute the macro.

Expected Behavior

The following should be displayed: ä ö ü ß

Actual Behavior

See screenshot below.

Debug Information

Notepad++ v8.5.3 (64-bit)
Build time : May 15 2023 - 06:09:36
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 21H2
OS Build : 19044.2965
Current ANSI codepage : 1252
Plugins : none

image

@Yaron10
Copy link

Yaron10 commented Jun 9, 2023

@donho, @pryrt & all,

This and the EOL issues.
Would it better to revert fff5f9b with all its advantages?

@rdipardo
Copy link
Contributor

rdipardo commented Jun 9, 2023

@Yaron10

Would it better to revert fff5f9b with all its advantages?

My position on that is the same as before. The technical debt that TinyXML has become needs to be seriously considered before it starts holding Notepad++ back in even more critical things, like security.

UTF-8 is the present and foreseeable future of data interchange formats. The choice between UTF-8 and TinyXML should be easy to make.

As for this particular issue, 0xC3 is the high-order byte of all four umlauts, so, to take a guess, either :

  • the macro was saved by an older N++ version (i.e, as the byte sequence &#x00c3¤ &#x00c3¶ &#x00c3¼ &#x00c3Ÿ), and only the top byte of each character was read by 8.5.3 when it loaded shortcuts.xml;

  • "neu 1" is encoded in some singe-byte (big-endian ?) code page, so, even if the macro contents were UTF-8, only the first, highest byte was written to the file.


@BernieStn, hast du die FAQ gelesen?

@Yaron10
Copy link

Yaron10 commented Jun 10, 2023

@rdipardo,

As for this particular issue, 0xC3 is the high-order byte of all four umlauts, so, to take a guess, either :

I'm not sure.

I've tested שלום with the latest version & UTF-8.
If you record pasting שלום, you get the expected result on playing the macro.
If, however, you record typing the letters, you get:

תמונה

Thank you.

@BernieStn
Copy link
Author

@rdipardo Thanks for your response. Here's an answer for your guess:

  • "the macro was saved by an older N++ version". No, I installed a new version of Notepad++, deleted all existing macros (because a MessageBox popped up and informed me that macros might be incompatible, so I thought it would be a good idea to start from scratch) and recorded the new macros.
  • "neu 1" is encoded in some singe-byte (big-endian ?) code page": No, it is encoded UTF-8.

If you need further information, please let me know. I will provide any needed information.

@Yaron10
Copy link

Yaron10 commented Jun 10, 2023

@donho,

Great! 👍
One little *. :)

Thank you for the quick fix.

@donho
Copy link
Member

donho commented Jun 10, 2023

@Yaron10
Thank you for your heads up!

@BernieStn
Copy link
Author

Absolutely great, thanks a lot for this quick fix. Just one character fixes the bug :-)

molsonkiko pushed a commit to molsonkiko/notepad-plus-plus that referenced this issue Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants