notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
[BUG] <title>CSS lexer incorrectly parses Korean font-family names in ANSI (CP949) encoded files
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 29.4k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Is there an existing issue for this?
- I have searched the existing issues
Is the issue reproducible in Notepad++ without plugin?
- I have tried Notepad++ without plugin
Is the issue reproducible in portable version of Notepad++?
- I have tried portable version of Notepad++
Does the issue affect SciTE?
- I have tried SciTE
Description of the Issue
When editing a CSS file encoded as ANSI (Windows code page 949 / Korean CP949), Notepad++ incorrectly parses CSS declarations containing Korean font-family names.
The same file works correctly when encoded as UTF-8.
Steps To Reproduce
Create a CSS file.
Set the language to CSS.
Convert the file encoding to ANSI (CP949).
Insert the following code:
body {
font-family:
"Nanum Gothic",
"나눔고딕",
"맑은 고딕",
"돋움";
}
Observe syntax highlighting and editing behavior around the Korean font names.
Current Behavior
The CSS should be parsed exactly the same as in UTF-8 encoded files.
Quoted Korean font names should be treated as normal CSS strings and should not affect parsing, syntax highlighting, or editing behavior.
Expected Behavior
The CSS should be parsed exactly the same as in UTF-8 encoded files.
Quoted Korean font names should be treated as normal CSS strings and should not affect parsing, syntax highlighting, or editing behavior.
Debug Information
Notepad++ v8.9.6.4 (64-bit)
Scintilla 5.6.2
Lexilla 5.4.9
Windows 10 Pro 22H2 (64-bit)
OS Build 19045.6466
Current ANSI codepage: 949 (Korean)
ANSI encoding: CP949
Reproducible with CSS language mode enabled
The issue appears to be related to the CSS lexer handling of Korean multibyte characters in ANSI/CP949 encoded files.
UTF-8 encoded files do not exhibit the problem.
Anything else?
No response
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 CSS lexer in Lexilla and reproduce the reported declaration in CSS language mode using a CP949-encoded file. Compare its parsing and highlighting with the UTF-8 version; done means quoted Korean font-family names are handled as normal CSS strings without affecting surrounding editing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100