The goal of this small application is to illustrate how one can convert text from one encoding to another using the functionalities provided by the Microsoft .NET Platform.

Installation

Astec is a .NET application, so you must have the .NET Platform on your machine before installing and using Astec. You can get the .NET Platform freely from Microsoft's Web site here: http://www.microsoft.com/net/.

To install Astec, simply extract the content of the Astec.zip file in a folder of your choice, for example C:\Astec. The Source sub-folder contains the source code of the project and all ancillary source files (help, etc.). The Executable sub-folder contains the compiled program and its help. The Test sub-folder contains test files.

To un-install Astec, simply delete the folder where you have extracted the Astec files.

How to Use Astec

  1. List the files to convert in the main list box of the program. To do this, use the Add button, or simply drag and drop the files you want to process. Note that all input files must have the same input encoding if they have no automatic detection mechanism.
  2. Select the encoding of the input file in the Input encoding list box. If the encoding is not listed, enter its IANA name in the edit box. You can also enter the codepage number.
  3. Select the output encoding in the Output encoding list box. If the encoding is not listed, enter its IANA name in the edit box. You can also enter the codepage number.
  4. Specify the output options you want.
  5. Click Convert.

XML Documents

If you select to escape non-supported characters in Java style, the output will be in Hexadecimal NCRs for XML documents. This allows you to process XML documents and other file formats at the same time.

The encoding declaration of the document is updated (or added if it does not exist in the original file) according the output encoding you select.

If there is a <meta> element that has a http-equiv="content-type" attribute, the value for the charset entry of the content attribute in the same <meta> element will be changed to reflect the encoding change.

For XHTML files, the XML declaration is added automatically only for encoding other than UTF-8 and UTF-16, otherwise the user is asked if the statement should be added (See the XHTML 1.0 specification for more details).

Check the option Use custom entity resolver for XML to use the default set of character entities provided for XHTML (you can edit the default set in the AstecDefaults.ent file). To use the DTD declared in an XML document make sure to uncheck this option.

Output Files

The output files will have the same name as the input files, except if you set the option Prepend this to the output file's extension. In this case the output file name will be the same as the input file name, with your additional text you have specified, prepended to the original extension. For example: if the input file is "myfile.txt" and the specified text you have defined is ".out", the output file will be "myfile.out.txt".

Important: The program does not make any automatic backup of the input files.

Disclaimer

No Warranties: This software and the accompanying files are provided "as it" and without warranty of any kind. The provider of the software does not cannot warrant the performance or results you may obtain by using the software or such files. The provider of the software makes no warranties, express or implied, including but not limited to any warranty as to title, infringement of third-party rights, merchantability, or fitness for a particular purpose.

No Liabilities: The provider of the software shall not be liable for any damages arising from this agreement as a result of your use of the software. In no event will the provider of the software be liable for any lost revenue, profit or data, or for direct, indirect, special, consequential, incidental or punitive damages, however caused and regardless of the theory of liability, arising out of your use of or inability to use the software, even if the provider of the software has been advised of the possibility of such damages.