Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Doing kanji and stuff in email headers
- Date: Tue, 31 Jul 2012 02:33:15 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: [tlug] Doing kanji and stuff in email headers
- References: <50168F97.8020209@imaginatorium.org>
Brian Chandler writes: > o What's the neatest way to decide if it's necessary? OR The most elegant way is to use a language whose standard library is at least mildly intelligent about these things. Are you sure PHP doesn't have a function to RFC-2047-encode (and decode) mail headers? The algorithm is standard and pretty simple. > o Can I after all just use UTF-8 because it's ok nowadays? Well, that depends on your RFC-2047-encode function. What *should* happen is that pure ASCII isn't transfer-encoded at all, languages (eg, Spanish or German) that are mostly Latin characters should be quoted-printable-encoded[1], and non-Latin languages (both unibyte such as Russian and multibyte like Japanese) should be base64 encoded. If your encoding function isn't that smart, you should try to detect each case. (ASCII is easy, and there are reasonable heuristics for distinguishing text appropriate for quoted-printable from that which should use base64.) Footnotes: [1] Bonus points here for using NFD Unicode so that base Latin characters are readable.
- References:
- [tlug] Doing kanji and stuff in email headers
- From: Brian Chandler
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Doing kanji and stuff in email headers
- Next by Date: Re: [tlug] Doing kanji and stuff in email headers
- Previous by thread: Re: [tlug] Doing kanji and stuff in email headers
- Next by thread: Re: [tlug] Doing kanji and stuff in email headers
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links