DP_AlphaWords

Download | Usage | Example Output | Resources | Sites

This ColdFusion 4.1+ CFML custom tag provides a simple way to ensure proper interpertation of such data as random passwords. It helps to eliminate confusion between "1" (One) and "l" (Lowercase "Ell") and "0" (Zero) and "O" (Uppercase "Oh").

This tag is not supported, but suggestions are welcome. Send any comments to the author at webmaster@depressedpress.com.


Download

This tag requires Allaire's Cold Fusion development enviroment, version 4.x or later. The Depressed Press of Boston provides this component "as is" and offers no warranty or guarantee concerning its suitabilty to any task.

The archive contains the custom tag itself, documentation, and examples.

DP_AlphaWords.zip, 4kb

If you're using DP_AlphaWords in your applications let us know at webmaster@DepressedPress.com!


Usage

The tag takes a string and presents one of five standard "alpha word" encoding sequences. For example the tag might take the string "ABC" and return the standard NATO encoding of "Alpha Bravo Charlie". It can also present more detailed information to enforce case.

This is useful in many technical support arenas. For example relating a complex serial number or activation code to a customer over the phone is made much easy and clearer.

If you find the tag useful and use it on your site please let us know!

Tag Usage

The DP_AlphaWords takes five parameters:

AlphaStandard The encoding standard to use. Five standards are supported: "NATO" (default), "Police", "Military", "English", "International" (and that's US military and Police to be specific).
InputString The string to be converted.
OutputVar The name of the variable to be used for outputing the results of the conversion. This defaults to "AlphaConversion".
OutputType "Simple" (default) or "Verbose". Simple will output only the conversion words on a single line. Verbose will output full cae information as well with each character on a separate line.

Tag Output

The tag outputs a string variable as defined by the "OutputVar" attribute. This variable is HTML formatted and contains the conversion.

Tag Example

The following example converts the string "qle1h50hO" (which contains some ambiguous characters) to a simple NATO alpha conversion:

If case were important to the application you might use the "Verbose" output type as in the following call:

"Verbose" is especially good for phone applications as it produces a "script"-like output that's very easy to read.


Example Tag Output

The asking for "qle1h50ho" in simple NATO conversion returns the following in the "AlphaConversion" variable:

"Quebec Lima Echo One Hotel Five Zero Hotel Oscar"

The same string using the "Verbose" setting would returns the following in the "AlphaConversion" variable:

Lowercase "q" as in Quebec
Lowercase "l" as in Lima
Lowercase "e" as in Echo
The Number One
Lowercase "h" as in Hotel
The Number Five
The Number Zero
Lowercase "h" as in Hotel
Uppercase "O" as in Oscar


Other Resources

Other resources to help you make the most of this component including code walkthroughs and supporting systems and external web links.

DP_AlphaWords Example
A simple free form example of DP_AlphaWords.

Sites using DP_AlphaWords

If you're using DP_AlphaWords and are not listed, please let us know at webmaster@DepressedPress.com!