From ip tuning
Jump to: navigation, search

toascii - converts non-ASCII characters to ASCII equivalents

   Copyright (C) 2011 by Manuel Azevedo <azevedo.manuel[at]gmail[dot]com>

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <>.

Version 1.0 - 18th May 2011


Bulk Administration Tool (BAT) is very useful to import volumes of information - and Excel is your best friend when using BAT.

Non-ASCII characters

Callmanager supports UNICODE non-ASCII characters. With Excel you can easily create BAT files that support both non-ASCII and ASCII characters automatically.


This is an Excel Macro file. If you do not feel secure to use the Excel macro file, use the included text file and create a new Macro on a new Excel sheet.

After you export the data from Excel into a CSV file, don't forget to convert it to UTF-8 and, if the field separator is not a coma, to change it to a comma.

Adding new conversions

Use these two arrays to make the conversion:

  • ANSI is the array with the non-ASCII character
  • ASCI is the array with the ASCII translation (can be more than one character, like ä converts to ae)
    ANSI = Array("ã", "Ã", "â", "Â", "á", "Á", "à", "À", "ä", "Ä", "ª", _
                 "ê", "Ê", "é", "É", "è", "È", "ë", "Ë", _
                 "î", "Î", "í", "Í", "ì", "Ì", "ï", "Ï", _
                 "õ", "Õ", "ô", "Ô", "ó", "Ó", "ò", "Ò", "ö", "Ö", "º", _
                 "û", "Û", "ú", "Ú", "ù", "Ù", "ü", "Ü", _
                 "ç", "Ç", "ñ", "Ñ", "ß", "Œ", "œ", "Æ", "æ")
    ASCI = Array("a", "A", "a", "A", "a", "A", "a", "A", "ae", "AE", "a", _
                 "e", "E", "e", "E", "e", "E", "e", "E", _
                 "i", "I", "i", "I", "i", "I", "i", "I", _
                 "o", "O", "o", "O", "o", "O", "o", "O", "oe", "OE", "o", _
                 "u", "U", "u", "U", "u", "U", "ue", "UE", _
                 "c", "C", "n", "N", "ss", "OE", "oe", "AE", "ae")

Keep in mind the index of the character and converted character must match, that is ANSI(1)="ã" and ASCI(1)="a"


Text and Excel Macro file (zipped)