Lingua::Klingon::Recode can convert Klingon words between different encodings.
@copy = Lingua::Klingon::Recode::recode('XIFAN HOL', # from
'tlhIngan Hol', # to
use Lingua::Klingon::Recode ':all';
@copy = recode 'XIFAN HOL', 'tlhIngan Hol', @original;
# demonstrate scalar version for a change
use Lingua::Klingon::Recode qw( recode );
$copy = recode 'XIFAN HOL', 'tlhIngan Hol', $original;
Lingua::Klingon::Recode is a module which allows you to convert Klingon text from one encoding to another.
For example, one frequently-used encoding is the so-called 'XIFAN HOL' encoding (after the encoded version of what is 'tlhIngan Hol' in the standard encoding).
All suported encodings can represent the same sounds, but they use different characters or sequences of characters to do so.
Most encodings have three allowable names (or aliasses): the transliteration of 'tlhIngan Hol', an abbreviated version with only 'tlhIngan', and an extended version "tlhIngan Hol Dajatlh'a'" (this extended version is mainly used to distinguish between related encodings that differ in how they represent the apostrophe).
The support encodings, with their recognised aliasses, are:
tlhIngan Hol, tlhIngan, tlhIngan Hol Dajatlh'a'
The standard encoding for Klingon; this is the usual transliteration.
tlhingan hol, tlhingan, tlhingan hol dajatlh'a'
This is the same as the standard encoding, except that all letters are lowercase. This has the grave disadvantage that 'q' and 'Q' are conflated, and that "ngh" can represent either "ng+H" or "n+gh" (it is interpreted as the former).
TLHINGAN HOL, TLHINGAN, TLHINGAN HOL DAJATLH'a'
This is the same as the standard encoding, except that all letters are uppercase. Again, 'q' and 'Q' cannot be distinguished in this encoding, and the sequence "NGH" is ambiguous.
XIFAN HOL, XIFAN, XIFAN HOL DAJAX'A'
This is the so-called "XIFAN HOL" encoding, used, for example, as the encoding of some fonts.
XIFANZ, XIFAN HOL DAJAXZAZ
This is the same encoding as the one above, but it uses Z for what is written ' (apostrophe) in the standard encoding, rather than the apostrophe. This encoding uses only the 26 letters of the uppercase Roman alphabet.
This encoding must be specified in its full form, or in the abbreviation 'XIFANZ'.
xifan hol, xifan, xifan hol dajax'a'
This is the "XIFAN HOL" encoding with all letters replaced by their lowercase form.
xifanz, xifan hol dajaxzaz
This is the "XIFAN HOL" encoding with all letters replaced by their lowercase form, and with 'z' rather than "'" for the apostrophe. This encoding uses only the 26 letters of the lowercase Roman alphabet.
uhmal gnj, uhmal, uhmal daiauzaz
This is an encoding formed by representing each Klingon letter in the standard transliteration with a lower-case Roman letter in alphabetical order according to the standard transliteration. It is also the encoding currently used by Lingua::Klingon::Collate. It can be represented as followed:
tlhIngan Hol a b ch D e gh H I j l m n ng
uhmal gnj a b c d e f g h i j k l m
tlhIngan Hol o p q Q r S t tlh u v w y '
uhmal gnj n o p q r s t u v w x y z
UHMAL GNJ, UHMAL, UHMAL GNJ DAIAUZAZ
This is the uppercase version of the 'uhmal gnj' encoding.