Howdy,

In the course of one of my hobbies (Heraldry in the SCA), there is often need to represent non-ASCII characters, some of which are not in ISO-Latin-1. These are all accented letters of some sort (or ligatures). In order to accomodate correspondents who may be limited to a typewriter character set, a notation was devised which has become known as "Da'ud notation".

In this notation, special characters are encoded as a two character sequence within {}. Typically, the first character is the underlying letter, and the second denotes the "accent" mark. For example, a c with a cedilla is {c,}.

Since I maintain the master database of stuff for this hobby, I get to deal with translating to and from this notation. To that end, I have a Perl module that captures this process in a dark box. In order to make this potentially useful tool available to more people (or at least make it easier for the wider community to get), I'm considering putting it up on CPAN.

I'm open to suggestions on a better name or namespace to place this. Absent such convincing, I'm gonna stick with Text::Daud.

The module presently translates from Daud to ASCII, Latin-1, HTML Entity, and Unicode. It also can translate from Latin-1 back to Daud. It also will tell you if a string can be translated from Daud to the selected target form without loss of information. I'll share details of the API under separate cover later.

Thanks for any useful suggestions you might have.

yours,
Michael

Replies are listed 'Best First'.
Re: YA Text encoding module -- Text::Daud
by valdez (Monsignor) on Aug 20, 2002 at 19:44 UTC

    I searched CPAN for some obvious namespaces such latin, unicode, convert and text to have an idea of what is out there. Latin showed three modules, not related between them; unicode showed 23 modules, and your module under such namespace would be at position 3. There are 101 modules under word convert and 345 under text, where you would be at position 17 :)

    Your module doesn't belong only to unicode namespace, not even convert; it seems enough general and bounded to text conversion. So your choice seems correct to me, except that Text namespace is a bit crowded.

    A possible solution would be to change perspective and stick it under Unicode, possibly leaving out conversions that can be achieved using other modules piped with yours.

    Ciao, Valerio

Re: YA Text encoding module -- Text::Daud
by seattlejohn (Deacon) on Aug 20, 2002 at 19:39 UTC
    ++herveus. I've been doing some similar work recently with pinyin representations of Mandarin Chinese, so I can definitely appreciate the need to have text conversions that are English-keyboard friendly.

    As for namespace, Text feels right to me -- better than either String or Lingua (I'm assuming that the Daud encoding is not tied to any particular language). On the whole, Text::Daud seems like a logical choice.

    Can't wait to see the code ;-)

Re: YA Text encoding module -- Text::Daud
by theorbtwo (Prior) on Aug 20, 2002 at 23:01 UTC

    You might to look at Encode and Encode::Encoding, perl's new and (hopefuly) consistent solution to the encoding problem.

    Also, you might consider doing the D'oh trick, and naming your module Encode::Da'ud (which is equivlent to Encode::Da::ud.)

    Also, do you have a way to encode '{'?


    Confession: It does an Immortal Body good.

      Howdy!

      My query on comp.lang.perl.modules also yielded a suggestion to put it in the Encode:: namespace. I'm taking that suggestion quite seriously.

      I don't encode '{' because the particular focus of this encoding scheme is to represent accented letters (and other letter thingies). It does not try to address non-alpha characters (for a broad definition of 'alpha').

      yours,
      Michael

Re: YA Text encoding module -- Text::Daud
by tbone1 (Monsignor) on Aug 21, 2002 at 12:39 UTC
    Hm, maybe I need to get cracking on a module for the characters in the Viking runic alphabet. (Although I have gut feeling that, if I searched CPAN, I'd find that TIMTOWTDI already.)

    --
    tbone1
    As God is my witness, I thought turkeys could fly.