Git Product home page Git Product logo

attachment-encoding-localized-autodetect's Introduction

What's this?

When I attach plaintext files to a mail, Thunderbird automatically tries to detect their character encoding from their contents, by the commit:

http://hg.mozilla.org/comm-central/rev/2b9773749c86

However, because the universal (global, generic) detector is always used, Thunderbird often fails to detect character encoding of files. For example, on a Japanese environment, "Shift_JIS" and "EUC-JP" are wrongly detected as "windows-1252".

This addon forces Thunderbird to use localized encoding detector based on the system language, As the result, plain text files will be attached with correct encoding.

This project is currently suspended. See the next section for more details.

Versions of Thunderbird who want this addon

By the commit between Thunderbird 31 and Thunderbird 38, the universal charset detector is removed:

http://hg.mozilla.org/mozilla-central/rev/2f0c68d4d7ca

It is introduced by the bug:

844115 โ€“ Remove the "universal" encoding detector (chardet) https://bugzilla.mozilla.org/show_bug.cgi?id=844115

After that, basically Thunderbird 38 and later uses language-specific charset detector. So Thunderbird 38 and later doesn't need this addon. (Of course, this addon will become useful again, if less-effective universal charset detector is re-introduced in the future.)

Steps to test

Note: these steps are just for a Japanese environments. In other languages, they are possibly detected unexpected encodings...

  1. Attach samples/*.txt files to a new message.
  2. Save it to the Draft folder.
  3. Choose "View" => "View Sorce".
  4. You'll see detection result for file contents as "Content-Type:text/plain; charset=...." in each header of attachments.

Without this addon, sjis.txt and euc.txt are detected as "windows-1252" unexpectedly. With this addon, they are correctly detected as Shift_JIS or EUC-JP.

attachment-encoding-localized-autodetect's People

Contributors

cosmo0920 avatar kou avatar mooz avatar piroor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.