notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
Function parameters hints written in Japanese get garbled
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 29.4k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description of the Issue
When I create/modify an API file (plugins\APIs\) with my function hints in Japanese, it provides gabled ones.
I specified encodings as UTF-8 and Shift_JIS because the default Windows-1252 cannot contain Japanese letters, but both are garbled.
(...I feel this will occur also in some non-latin languages, but I didn't confirmed)
Steps to Reproduce the Issue (UTF-8)
- Open Notepad++, create a new file and set its encoding as
Encoding->UTF-8 - Specify its encoding at the first line as
<?xml version="1.0" encoding="UTF-8" ?> - Complete my Lua API hints in Japanese like this
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<Environment ignoreCase="yes" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" additionalWordChar=".:" />
<AutoComplete language="LUA">
<KeyWord name="somefunc" func="yes">
<Overload retVal="返り値" descr="日本語ヒント">
<Param name="引数1" />
<Param name="引数2" />
</Overload>
</KeyWord>
</AutoComplete>
</NotepadPlus>
- Save it somewhere
- Close Notepad++
- Copy it to
C:\Program Files (x86)\Notepad++\plugins\APIsand rename aslua.xml - Open Notepad++, create a new file and set its language as
Lua - Confirm
Function parameters hint on inputis enabled in the preference. - Type
somefunc()(note that function completion works correctly if enabled)
Steps to Reproduce the Issue (Shift_JIS)
- Open Notepad++, create a new file and set its encoding as
Encoding->Character sets->Japanese->Shift-JIS - Specify its encoding at the first line as
<?xml version="1.0" encoding="Shift_JIS" ?> - Complete my Lua API hints in Japanese like this
<?xml version="1.0" encoding="Shift_JIS" ?>
<NotepadPlus>
...
...The rest is the same as UTF-8.
Expected Behavior

collage.
Actual Behavior
UTF-8

Shift_JIS

(Extra: Windows-1252 with English contents)

Debug Information
Notepad++ v7.5.4 (32-bit)
Build time : Jan 1 2018 - 01:47:45
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 7 (64-bit)
Plugins : ComparePlugin.dll DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll NppFTP.dll NppTextFX.dll NppToolBucket.dll PluginManager.dll Translate.dll zoomdisabler.dll
Global styles -> Grobal override
Font name: Migu 1M
Enable global font: ON
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the API files under plugins\APIs\ and the Lua function-parameter hint path enabled in Preferences; compare how UTF-8 and Shift_JIS declarations are read and displayed. Reproduce the supplied Japanese example, then verify that function hints show the original Japanese text correctly for both encodings without breaking completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- desktop, internationalization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100