Menu

Test possible unicode fix for MultiClipboard

loonychewy
2008-05-09
2012-11-14
  • loonychewy

    loonychewy - 2008-05-09

    Hi,

    I'm doing a test MultiClipboard plugin bug fix for the causing of input problem for Notepad++ running under unicode. As I'm not able to reproduce the bug on my own computer, this is very much a shot in the dark.

    If anyone who is experiencing this problem and is interested in helping me with the test, kindly please download my test bug fix here:
    DLL only: http://www.peepor.net/loonchew/download.php?f=MultiClipboard_1.4.1.UnicodeBugTest
    Source+Dll: http://www.peepor.net/loonchew/download.php?f=MultiClipboard_1.4.1.UnicodeBugTest_Src
    and reply here whether the fix works or not.

    My most sincere thank you to anyone who's kindly helping :-)

     
    • DV

      DV - 2008-05-11

      Yes, the input is OK under both XP and MustDie (well, 98 ;)). The old dll-file causes the input problem.
      But, I must say that in both systems (XP and 98), text, copied from UTF-8 or UCS-2 file, is pasted into ANSI file incorrectly (the bytes are pasted without previous conversion to ASCII). I was wrong when I said before that the pasting is OK. It works correctly only between UTF-8 and UCS-2 (it's not a surprise because UCS-2 files are stored inside Scintilla as UTF-8), but not from UTF-8/UCS-2 to ANSI and from ANSI to UTF-8/UCS-2.
      I.e. when you paste from ANSI file to Unicode file, you must perform previous conversion from ANSI to UTF-8; when you paste from Unicode file to ANSI file, you must perform previous conversion from UTF-8 to ANSI. You can find an example of such conversions inside the Encodings plugin: see the file "src/encodings/SysUniConv.cpp".

       
    • DV

      DV - 2008-05-09

      Well, it seems to be working for me (with russian text, both ANSI and UCS2-LE). But, for UCS2-LE, which is stored inside Scintilla as UTF-8, the text is shown incorrectly in Multi-Clipboard's menu. It seems you show UTF-8 text in the menu as ANSI text without previous convertion from UTF-8 to ANSI. However, this text is pasted correctly into a file.
      By the way, the cause of problems of some plugins with new versions of Notepad++ is the following: new Notepad++ uses ANSI WindowProc for Windows 98 and similar, and uses Unicode WindowProc for Windows 2000 and higher. In particular, it affects all text messages: ANSI WindowProc works with CHARs whereas Unicode WindowProc works with WCHARs. So, the same thing must be done in all the plugins.

       
    • loonychewy

      loonychewy - 2008-05-11

      Hi DV,

      Many thanks for your testing and feedback. Can I confirm with you that input was broken with previous versions of this plugin (with Notepad++ version >= 4.8.2), and the test version here resolves this?
      As for the menu display, it has always been like that. I've to re-write the plugin to handle all the conversions between encodings, as it is currently assuming all things are in ANSI, and of course compiling in unicode. I've tried once a quick and dirty unicode version change, but it was unsuccessful and I've scrapped that. I'm on the drawing board for a new version that should hopefully improve many things about this plugin, but that'll take time :-)
      And thanks also for confirming what I thought was causing the input bug. Let's just hope that I implemented the fix correctly ;-) Would be nice to hear more yes before I release this as an update. =-D