perl-unicode

Re: [PATCH][docs] Encode.pm

2002-03-20 11:47:20
On Wednesday, March 20, 2002, at 11:48 , Anton Tagunov wrote:
With my upgraded knowledge of encoding naming I propose this.

Justification:

1)
  Shift-JIS -> Shift_JIS does not hurt anyone, cause it does
                         not work either way, Encode::encode
                         understands only 'shiftjis'

                         I would prefer to settle the naming
                         first,
                         going to submit a separate bug
                         report for all aliases that do not
                         work later

This is covered by aliases as of 0.93. "shiftjis" remains canonical name for module, however. (FYI all canonical encoding names in Encode::XX are inherited from *.enc so they are compatible with Encode::Tcl).
  Here is the excerpt of new pod.

         Canonical   Alias             Description
--------------------------------------------------------------------
   [snip]
         shiftjis    /shift.*jis$/i    Shift JIS (aka MS Kanji)
                     /sjis$/i

See the regex? Now you can go "$sjis = encode('Shift_JIS', $utf8)" with no problem!

2)
  I do not care too much if I have done a wrong classification
  of encodings: I hope that as soon as something like this
  gets into the docs we'll get plenty of feedback sufficient
  to correct even the worth mistakes :-) 2 me it looks
  good just to start the section.

  <DISCLAIMER>
   The main goal was to separate MIME names from
   ISO names from proprietary names.
  </DISCLAIMER>

Comment:

  JIS 0201
  JIS 0208
  JIS 0212
  GB 1988
  GB 2312

  are under my severe suspect, but I have posted separate mails
  on them.

Grumbling:

  CNS 11643
  GB 12345

  really hurt my feelings because they have a space inside,
  but I have found no reason to touch them: neither
  IANA nor rfc1345 name them, and everywhere I've seen them
  they are written with a space.
  Do you think it could still be translated to CNS-.., GB-
  for consistency and beauty ?  :-)

Proposition:

  Should Name: HZ-GB-2312 be established as a synonym to HZ?
  Or not worth the trouble?

Looking forward to your opinions! :-)))

- Anton
[patch follows]


I will apply the patch then revise the pod. Well, Encode.pm's pod seems too long now. I think the general question should be exported to, say, perlencode.pod and Encode.pm's pod slim down to API documentations. What do you say, jhi?

Dan the Man with Too Many Names for Too Many Encodings