Download Latest Version AutoCodepage_v1.2.7_UNI.zip (622.4 kB)
Email in envelope

Get an email when there's a new version of AutoCodepage

Home / v1.2.0
Name Modified Size InfoDownloads / Week
Parent folder
doc 2018-02-05
src 2017-04-20
plugin 2017-04-18
bin 2017-03-22
readme.txt 2018-02-05 5.2 kB
license.txt 2016-12-20 35.1 kB
Totals: 6 Items   40.3 kB 0
******************************************************************
*                                                                *
*   AutoCodepage plugin v1.2.0 for Notepad++                     *
*   Builds for 32 and 64 bits Notepad++ installations available  *
*                                                                *
*   Author: Andreas Heim, 2016 - 2017                            *
*                                                                *
******************************************************************



====================
  Why this plugin?
====================

I'm a Delphi developer and beyond writing code I'm responsible for
our company's build system which is based on old-school batch
scripts. For changing and extending these scripts I use Notepad++.

One day I made some changes and after that we had a malfunction in
the build system caused by a typo related to the wrong encoding of
german umlaut characters - when editing the batch script I forgot
to set the correct character encoding, OEM 850 in this case.

To secure the process of editing our build scripts I wrote this
plugin to automate the encoding switching. Maybe some other batch
scripters will find it useful too.

To get as much flexibility as possible I made it configurable so
that one can use it not only for batch scripts on a german Windows
installation.



============
  Features
============

This plugin allows you to create file classes which are defined by
the related filename extensions and (optionally) a language (s.a.
menu "Languages" in Notepad++). For every file class you have to
provide the code page to which should be switched to when the
plugin detects that the active Notepad++ document is a member of
this file class.

The plugin captures the following events in Notepad++:

  - The active tab of Notepad++ is changed.

  - The language of a file already loaded in Notepad++ is changed.

  - The file extension of a file already loaded in Notepad++ is
    changed.

  - A file is saved, closed or deleted (only for internal
    management).

When one of these events fires the plugin gets invoked. After it
has verified the membership to a certain file class it changes the
code page of the active document to the related code page of its
file class, according to your settings.

The v1.2.0 release is mostly a bugfix release. I realized that I
still hadn't covered all possible Notepad++ workflows. If a newly
created document was saved to disk and got a filename extension
which matched the settings for a certain file class Notepad++ got
hung. Because of that during file saving the plugin gets disabled
now.

This is not a real problem because AutoCodepage is not intended to
be an encoding converter but an encoding switcher. If the encoding
of a new document is changed (even manually) just before saving to
a file one ends up with a disk file encoded with Notepad++'s
standard encoding (according to its settings) and a text buffer
(document in sight) which shows the content of the file as if it
were encoded with the set encoding. This would be just a mess and
not what a user wants.

So, to clarify things: AutoCodepage helps you to work with already
existing documents. The encoding of documents newly created in
Notepad++ has to be set by the user BEFORE writing content.



=================
  Installation
=================

1. If you run a 32 bits version of Notepad++ copy the file
   "bin\x86\AutoCodepage.dll" to the "plugins" directory of your
   Notepad++ installation. In case of a 64 bits version take the
   file "bin\x64\AutoCodepage.dll". You can find the "plugins"
   directory under the installation path of Notepad++.

2. Copy the file "doc\AutoCodepage.txt" to the directory
   "plugins\doc". If it doesn't exist create it.



===========
  History
===========

v1.2.0 - March 2017
~~~~~~~~~~~~~~~~~~~
- changed:  removed stuff for compiling ANSI plugins from plugin
            framework.
- changed:  language names get retrieved by querying Notepad++.
- fixed:    Notepad++ hangs when a newly created document is saved
            to disk and the plugin gets invoked during this
            process.


v1.1.1 - March 2017
~~~~~~~~~~~~~~~~~~~
- fixed:    removed design flaw in settings file data. it is
            recommended to delete your old settings file if you
            defined file classes without a related language.
- changed:  minor changes to compile 64 bits version
- enhanced: 64 bits version released


v1.1 - March 2017
~~~~~~~~~~~~~~~~~
- changed:  Removed tabs from source code.
- changed:  Restructured source code.
- enhanced: Included Notepad++ languages up to Npp v7.3.3.
- enhanced: Updated NPPM_xxx message constants up to Npp v7.3.3.
- enhanced: Added wrapper methods for some Npp messages to
            NppPlugin class.
- enhanced: Version info in About box is getting retrieved from
            DLL file now.
- fixed:    The plugin causes popup of annoying dialogs.


v1.0 - December 2016
~~~~~~~~~~~~~~~~~~~~
- initial version

Source: readme.txt, updated 2018-02-05