On Monday, August 20, 2007 at 12:34:49 -0600, Kyle Wheeler wrote: > On Monday, August 20 at 06:49 PM, quoth Alain Bench: >> a charset=none label. Does it really happen? > I did actually see it in the wild. I think it was a misconfigured > webmail
Thanks Kyle! Adopted "charset-hook ^none$ cp1252" in the hookset. >> There is *no* charset auto-sensing for bodies. > How come? I can only guess that the initial author of the $assumed patch years ago tried to make it the least invasive and the least cycles consuming posible. I mean that given Mutt's design, $assuming one charset was dead easy (a oneliner) and costless, while auto-sensing would have needed more work and a partial redesign. And mutt-dev archives seem to show that EGE didn't believe much in the (IMHO great) value of auto-sensing. >> $assumed_charset=windows-1252 Appending anything is (practically) >> useless. > might benefit from matching all characters, in the guessed charset, > against [:print:] Available functions to determine what is printable and what is a control char do work in the current locale, not in another arbitrary charset. Convert to locale then check printability is not workable: A poor locale would limit sensing richer charsets. And if we had the magic universal isprint(), well... The practical benefit to the auto-sensing guesswork would be much lower than expected. "iso-8859-1:utf-8" would be possible, but unreliable (some UTF strings happen to not contain 128-159 bytes, and would be wrongly sensed as L1). "iso-8859-1:cp850" would probably work and have some value, especially to BBS users. However that's not a very common case, and people would anyway probably prefer "cp1252:cp850" which doesn't work well (nearly everything would be sensed 1252, nothing 850). Right now I can't think of any other example. Japanese charsets would probably not benefit at all from such printability check: Those charsets are already rather well distinguishable by the simple validity check. Bye! Alain. -- How to Report Bugs Effectively <URL:http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>