Skip to content

[BUG] <title>CSS lexer incorrectly parses Korean font-family names in ANSI (CP949) encoded files #18155

Description

@ppcmmc79-creator

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions