Skip to content

add support for cjkcodecs to Python email #39645

Closed

Description

@jasonrm
mannequin
BPO 852347
Nosy @warsaw
Files
  • Charset-1.diff
  • Charset.py.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/warsaw'
    closed_at = <Date 2004-05-10.15:04:04.000>
    created_at = <Date 2003-12-01.22:05:44.000>
    labels = ['type-feature', 'library']
    title = 'add support for cjkcodecs to Python email'
    updated_at = <Date 2004-05-10.15:04:04.000>
    user = 'https://bugs.python.org/jasonrm'

    bugs.python.org fields:

    activity = <Date 2004-05-10.15:04:04.000>
    actor = 'barry'
    assignee = 'barry'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2003-12-01.22:05:44.000>
    creator = 'jasonrm'
    dependencies = []
    files = ['1124', '1125']
    hgrepos = []
    issue_num = 852347
    keywords = []
    message_count = 9.0
    messages = ['19221', '19222', '19223', '19224', '19225', '19226', '19227', '19228', '19229']
    nosy_count = 2.0
    nosy_names = ['barry', 'jasonrm']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue852347'
    versions = []

    Activity

    1. jasonrm commented on Dec 1, 2003

      jasonrmmannequin
      MannequinAuthor

      As discussed last week on the email-sig
      list, the attached patch adds support for
      the CJKCodecs package as an alternative
      to the {Chinese,Japanese,Korean}Codecs
      packages. CJKCodecs 1.0.2 and above
      should work with this patch.

      This is advantageous because the Chinese
      and KoreanCodecs packages are no longer
      supported,maintained or available for
      download.

      This patch does not break compatibility
      with {Chinese,Japanese,Korean}Codecs,
      so they can still be used if desired.

      Lastly, this patch fixes a small typo that
      broke GB2312.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Dec 1, 2003
    3. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Dec 1, 2003
    4. warsaw commented on Dec 29, 2003

      @warsaw
      Member

      Logged In: YES
      user_id=12800

      Correct me if I'm wrong, but won't the attached patch work
      better? It simply removes the entries from CODEC_MAP that
      are already provided by cjkcodecs.aliases (and
      japanese.aliases and korean.aliases).

      See Charset.py.diff

    5. warsaw commented on Dec 29, 2003

      @warsaw
      Member

      Logged In: YES
      user_id=12800

      Oops, with the typo fix for gb2312.

    6. warsaw commented on Dec 29, 2003

      @warsaw
      Member

      Logged In: YES
      user_id=12800

      One more rev of Charset.py.diff

    7. warsaw commented on Dec 30, 2003

      @warsaw
      Member

      Logged In: YES
      user_id=12800

      I'm not even sure this patch is correct, since it breaks the
      test suite. The problem is that self.output_codec ends up
      being different with the patch than without it (in
      Charset.__init__()). For example:

      Python 2.3.3 (#1, Dec 19 2003, 11:33:00) 
      [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
      Type "help", "copyright", "credits" or "license" for more
      information.
      >>> from email.Charset import Charset
      >>> c = Charset('euc-jp')
      >>> c.output_codec
      'japanese.iso-2022-jp'
      >>> 

      But now with Charset.py.diff applied:

      ...
      >>> c.output_codec
      'euc-jp'

      We need to figure out what the right thing to do here is.

    8. jasonrm commented on Dec 30, 2003

      jasonrmmannequin
      MannequinAuthor

      Logged In: YES
      user_id=85984

      comments regarding Barry's Charset.py.diff:

      You shouldn't mention KoreanCodecs and
      ChineseCodecs in the comments as
      alternatives to CJKCodecs. Both are no
      longer maintained, or even available for
      download. Both have been completely
      replaced by CJKCodecs. Only
      JapaneseCodecs remains as a substitute
      package.

    9. warsaw commented on Dec 30, 2003

      @warsaw
      Member

      Logged In: YES
      user_id=12800

      Latest version of the patch, with updated comments as per
      Jason's followup, and including Tokio Kikuchi's fix for the
      test suite regression.

    10. warsaw commented on Dec 30, 2003

      @warsaw
      Member

      Logged In: YES
      user_id=12800

      Applied to Python trunk (2.4). This will be applied to
      Python 2.3 and closed when that branch's freeze is lifted.

    11. warsaw commented on May 10, 2004

      @warsaw
      Member

      Logged In: YES
      user_id=12800

      Closing this without applying it to 2.3. The general
      consensus was not to mess with this in a bug fix release, so
      it will have to wait until Python 2.4/email3.

    12. transferred this issue fromon Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions