Menu

Guidance for developping an UNICODE plugin

2009-06-12
2012-11-14
  • Gérard Gauthier

    I intend to develop a plugin, that basically could process one file or all the open files within the text editor, based on a modal dialog box. So this does not appear too complicated.

    I am however much worried with new UNICODE thing, that is now in the main stream with Notepad++.
    Of course, compiling a DLL as unicode should not be a problem.
    I suspect the NppInsertPlugin sample you can download on the FAQ page does not deal with Unicode.
    To add worries, the link to "Notepad_plus_msgs.h" is broken.
    And it's unclear how to deal with 16-bit strings through Scintilla as functions such as SCI_GETTEXT and SCI_SETTEXTstill deal with pointers to char type.

    So ladies and gents, is there any tutorial or reference project that covers the topics that worry me?

    Thanks a lot and hope I can advise on this new plugin fairly soon! :-)

    /g

     
    • cchris

      cchris - 2009-06-27

      Don:
      could you consider making the discrepancy between the "PluginInterface" and "PluginsManager" (extra s) source file names go?

      Link fixed.

      CChris

       
    • cchris

      cchris - 2009-06-12

      The link is not broken for Firefox, though it is indeed in Internet Explorer (at least 6.0). Since SF says MSIE6.0 is not supported.... we probably can't help.

      CChris

       
    • cchris

      cchris - 2009-06-13
       
    • Gérard Gauthier

      Sorry but I only use Firefox and "http://notepad-plus.svn.sourceforge.net/viewvc/notepad-plus/PowerEditor/src/MISC/PluginsManager/PluginsInterface.h" constantly returns a 404 error.

       
      • cchris

        cchris - 2009-06-25

        Oops, there is a "/trunk" missing before "/PowerEditor". I'mmaking the adjustment, hope it catches all such references. Please report if you find morecorrupted links like this, thanks.

        CChris

         
    • cchris

      cchris - 2009-06-25

      Follow up: links should be good now. Additionally, they now work again in IE - most had started breaking a few weeks ago.

      CChris

       
    • Gérard Gauthier

      On page "ANSI and Unicode versions of Notepad++" the link to the header file is still broken!

      Two additional questions if I may:

      * In exchanged text buffers with Scintilla (for example, SCI_GETTEXT) are characters encoded as multi-byte UTF-8?
      * On page "How to develop a plugin or a lexer", the sample project 'NppInsertPlugin' is already unicode or still ANSI?

      Thank you.

      /gg

       
      • cchris

        cchris - 2009-06-26

        InsertionPlugin is ANSI - and pretty ld at that.

        Scintilla only knows about styled bytes. What they mean is determined by the current buffer encoding. This can be queried using the NPPM_GETBUFFERENCODING message, which returns a value from the UniMode enum.

        CChris