Commit 280d9fd
Restore entity (d/en)coding for ANSI documents
Since this project came under new maintenance, the
focus has been on the stability of x64 releases
Back in v1.1, the (d/en)coding procedures queried
the document's code page before every transformation.
This was implemented by a pair of complementary
overloaded functions
Each function made a call to WideCharToMultiByte or
MultiByteToWideChar, as appropriate. This became the
source of access violations in 64-bit Notepad++,
sometime after 7.7 was released:
- https://fossil.2of4.net/npp_htmltag/tktview?name=c3c733e21f
- https://community.notepad-plus-plus.org/topic/18488/htmltag-1-1-plugin-broken-since-npp-7-7
087872a resolved that issue -- at the cost of properly
encoding multi-byte text. Preventing a crash was the
only priority at the time, as v1.1 had been rendered
completely unusable in 64-bit editors by a breaking
change to the upstream ABI:
- https://sourceforge.net/p/npp-plugins/discussion/725650/thread/08c8e87447
d2189a1 made another quick fix, one that preferred
Unicode at the expense of ANSI: #3
This makes the encoding of text selections depend on
the document's code page, the way it did before v1.21 parent eb36397 commit 280d9fd
1 file changed
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
395 | 400 | | |
396 | 401 | | |
397 | 402 | | |
| |||
568 | 573 | | |
569 | 574 | | |
570 | 575 | | |
571 | | - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
572 | 582 | | |
573 | 583 | | |
574 | 584 | | |
| |||
577 | 587 | | |
578 | 588 | | |
579 | 589 | | |
580 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
581 | 596 | | |
582 | 597 | | |
583 | 598 | | |
| |||
0 commit comments