ProgerXP / Notepad2e

Word highlighting, simultaneous editing, split views, math evaluation, un/grep, comment reformatting, UAC elevation, complete regexps (PCRE), Lua lexers, DPI awareness and more (XP+)
Other
372 stars 52 forks source link

Chinese and English mixed text wrapped untimely #334

Open wisenut2009 opened 3 years ago

wisenut2009 commented 3 years ago

Notepad2e wraps Chinese and English mixed text untimely when the option “Wrap text between words” is selected. WrappingText.zip

Could you make some improvements? Thank you very much!

ProgerXP commented 3 years ago

Wrapping is handled by Scintilla, not sure if we can influence it.

@cshnik This reminds me of a problem with HTML documents that have no language specified. With <html lang=en>, this text would be wrapped incorrectly (using word wrapping rules of English, i.e. breaking words on whitespace). With <html lang=zh>, it would use Chinese-specific rules. Scintilla probably has a similar setting or something for configuring locale-specific rules.

wisenut2009 commented 3 years ago

It seems the following modified version of Notepad2-mod solved the problem. Notepad2-mod is also based on Scintilla. https://github.com/zufuliu/notepad2