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

Incorrect display of Cyrillic in the macros submenu #12670

Closed
rddim opened this issue Dec 19, 2022 · 2 comments
Closed

Incorrect display of Cyrillic in the macros submenu #12670

rddim opened this issue Dec 19, 2022 · 2 comments
Assignees

Comments

@rddim
Copy link
Contributor

rddim commented Dec 19, 2022

Description of the Issue

When I use Cyrillic in the macros submenu it appears unreadable in the Macro menu.

Steps to Reproduce the Issue

  1. Download the latest v8.4.8 RC2 npp.8.4.8.portable.minimalist.x64.7z from http://download.notepad-plus-plus.org/repository/8.x/8.4.8.RC2/
  2. Open the shortcuts.xml
  3. Follow the instructions in the file and add макрос for the submenu (i.e. FolderName="макрос") to the existing Trim Trailing Space and Save macro
  4. Save and close the file
  5. Open notepad++.exe and click on Macro menu

Expected Behavior

npp_shortcuts_readable

Actual Behavior

npp_shortcuts_unreadable

Debug Information

Notepad++ v8.4.8   (64-bit)
Build time : Dec 19 2022 - 02:31:02
Path : X:\xxx\npp.8.4.8.portable.minimalist.x64\notepad++.exe
Command Line : 
Admin mode : ON
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 7 Professional (64-bit) 
OS Build : 7601.0
Current ANSI codepage : 1251
Plugins : none
@rdipardo
Copy link
Contributor

The bug is in the TinyXML library. It parses files with fgetws() (a.k.a. generic_fgets) 1, which does not properly decode multi-byte text.

tinyxml-fgetws-wrong-decoding

An explicit encoding declaration at the top of shortcuts.xml does not seem to make any difference 2.

Footnotes

  1. https://github.com/notepad-plus-plus/notepad-plus-plus/blob/58416114da14536dcc7a8ad36010da3382366ba6/PowerEditor/src/TinyXml/tinyxml.cpp#L761-L764

  2. i.e., <?xml version="1.0" encoding="UTF-8"?>

@ozone10
Copy link
Contributor

ozone10 commented Dec 20, 2022

Hmm TinyXML is not being developed anymore.

Maybe Notepad++ should try to move to TinyXML2, but this will require major refactoring.

@donho donho self-assigned this Jan 26, 2023
@donho donho closed this as completed in 6e7901e Jan 26, 2023
donho added a commit to donho/notepad-plus-plus that referenced this issue Apr 12, 2023
…ication

The macro/run commands menu folder (submenu entry) can be UTF8 characters.
After modification of macro/run shortcut commands, the macro/run menu UTF8 folder names can be saved correctly by this commit, but in Unicode character number form instead of human readible characters.

Fix notepad-plus-plus#12670
donho added a commit that referenced this issue Apr 13, 2023
…ication

The macro/run commands menu folder (submenu entry) can be UTF8 characters.
After modification of macro/run shortcut commands, the macro/run menu UTF8 folder names can be saved correctly by this commit, but in Unicode character number form instead of human readible characters.

Fix #12670, close #13516
donho added a commit that referenced this issue Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants