Sorting adds line breaks under Japanese locale
Strange issue that occurs only if you switch Windows locale (Control panel > Region > Administrative > Non-Unicode programs > Change system locale, then reboot) to Japanese. I tested this both on XP and Win10, same result.
Create a document (UTF-8, CRLF) containing 3 or more lines of Ххххх (these are Cyrillic characters, not Latin). Sort (Alt+O) - you will get about 1 extra line break for every 2 lines so instead of just 3 Ххххх lines you get 5 lines, 2 of which are blank. On other locales (English, Russian) you get 3 lines, no blanks.
The bug is because StrTrimA(pmsz, "\r\n"); , see https://github.com/zufuliu/notepad2/issues/168 and https://github.com/zufuliu/notepad2/commit/7192b4092dcc1dd874e34ef3fdb3bfbad81356f8
Fixed.
Possible, it worth to document that, n2e_StrTrimA only works when pszTrimChars doesn't contains DBCS trail bytes (see Scintilla's Document::IsDBCSTrailByteInvalid() method), it absolutely works for C0 control characters (\n\r\t\v\f space, etc.).