The experts will find this trivial, but I had to think it through for awhile and even ask a question or two of the monks when books fell short.

What you will find here is a fully functional NATO Phonetic Alphabet translator. I took one minor liberty in the translation table, by adding a 'phonetic' representation for space and newline.

The NATO Phonetic Alphabet was developed in the 1950s to be intelligible (and pronounceable) to all NATO allies in the heat of battle. It replaced other phonetic alphabets, such as the US military "able baker" alphabet.

The NATO Phonetic Alphabet is widely used in business, military, and paramilitary communications throughout Europe and North America. Anyone with a scanner tuned to a police or fire frequency will hear it almost immediately.

This JAPH is fairly straightforward, but was still fun to implement. It exceeds the traditional four line rule of thumb. Sorry; NATO chose long words. ;) Please reply with comments when you figure out the mechanism of action, and if you see ways to improve upon what's here, I'd love to hear.

Enjoy!!!!!

print${@qw{qw{Alpha Bravo Charlie Delta Echo Foxtrot Golf Hotel India +Juliet Kilo Lima Mike November Oscar Papa Quebec Romeo Sierra Tango U +niform Victor Whiskey X-ray Yankee Zulu Zero Wun Two Tree Fower Five +Six Seven Ait Niner Stop Space Re}}=(A..Z,0..9,"."," ","\n");\%qw}{$_ +}for qw{Juliet Uniform Sierra Tango Space Alpha November Oscar Tango +Hotel Echo Romeo Space Papa Echo Romeo Lima Space Hotel Alpha Charlie + Kilo Echo Romeo Stop Re}

Dave

"If I had my life to do over again, I'd be a plumber." -- Albert Einstein

Replies are listed 'Best First'.
Re: NATO Phonetic Alphabet JAPH
by LameNerd (Hermit) on Aug 28, 2003 at 03:32 UTC
    Isn't it fife instead of five or have they changed it?
      Is that a joke? A cursory look on google indicates "five", but in any event do you think you'd actually be able to tell the difference between the two if a French, Dutch, Scottish, Spanish, or Italian, etc. person were saying it?
      PS> They really butchered 3 and 4.

      --
      I'm not belgian but I play one on TV.

      I took part of my description and the alphabet itself from This website, which turned out to be the second site that my quick Google search turned up.

      The alphabet and numbers are true to the representation in my JAPH. It is a full-fledged translator from NATO Phonetic Alphabet to the standard English alphabet. The only exceptions are:

      • I didn't include "." - "Decimal", but instead included only "." - "Stop".
      • I added "\n" as "Re".
      • I added " " (space) as "Space".

      Of course it doesn't make for a terribly compact or obfuscated JAPH when you can easily see the familiar phonetic alphabet there. But it's still kind of a cool idea (if I may be so arrogant as to thumbs-up my own work).

      I might note also that it would have been easier and more compact to simply match on the first character of Juliet, Uniform, Sierra, Tango, etc., and not bother with the crossreference hash, but then it wouldn't have been a complete translator, in that numbers and punctuation would be left out. To do so would also have been even more obvious. But my primary goal was to implement a complete translator, in a compact, and creative way (hense, the anonymous hash).

      Dave

      "If I had my life to do over again, I'd be a plumber." -- Albert Einstein