Uh, there is only one true morse code, and it doesn't include japanese, umlaute, or even an exlemation point.
And I say not that because of standards-worship, but because morse code is what it is by international treaty, and (at least as I understand it), if you don't know that, you can't use the approprate bands. IOW, if you send "überrhacking" in morse over a frequency where morse or voice is allowed, you're in violation of the treaty, since that isn't morse. Similarly, if, on your code test, you are asked to encode "übergeschloss", the correct answer is "it can't be done in morse", or morse("uebergeschloss").
Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.