<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 11, 2013 at 3:24 PM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve+comp.lang.python@pearwood.info" target="_blank">steve+comp.lang.python@pearwood.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, 11 Dec 2013 15:07:35 -0800, Dan Stromberg wrote:<br>
<br>
>  $ chardet mpaa-ratings-reasons.list<br>
> mpaa-ratings-reasons.list: windows-1255 (confidence: 0.97)<br>
><br>
> I'm aware that chardet is playing guessing games, though one would hope<br>
> it would guess well most of the time, and give a reasonable confidence<br>
> rating.<br>
<br>
</div>What reason do you have for thinking that Windows-1255 isn't a reasonable<br>
guess? If the bulk of the text is Latin-1 except perhaps for one or two<br>
Hebrew characters (or what chardet thinks are Hebrew characters), it may<br>
actually be a reasonable guess.<br></blockquote><div><br></div><div>I get a traceback if I try to read the file as Windows-1255.  I don't get a traceback if I read it as ISO-8859-1.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

If it is a poor guess, perhaps you ought to report it to the chardet<br>
maintainers as a good example of a poor guess.<br></blockquote><div>I was considering that, and may do so.<br><br></div><div>I've also been wondering if ISO-8859-1 is just an octet-oriented codec, so it'll read about anything.  There are clearly non-7-bit-ASCII characters in the file that look like line noise in an mrxvt.<br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
By the way, this forum is a text-only newsgroup and so-called "Rich<br>
Text" (actually HTML) posts are frowned upon because most people don't<br>
appreciate having to read gunk like this:<br>
<br>
> <div dir="ltr"><br><div class="gmail_extra"><div<br>
> class="gmail_quote"> ... <br><br>
> <blockquote class="gmail_quote" style="margin:0px 0px 0px<br>
> 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div<br>
> class="im"> ... <br></div></div></div></div><br>
<br>
If you can, would you please turn off rich text posting when you post<br>
here please?<br>
<br>
Thank you.<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div>Apologies.  I didn't realize gmail was doing this.   I had thought it would only do so if I used the formatting options in the composer, but perhaps it does so even when just typing text.<br>
<br></div><div>I formerly used MH; are you using MH?  There isn't a lot of e-mail programs that don't do HTML anymore.  Even mutt can do HTML with very slight configuration; it's actually quite powerful and ISTR it can do MH folders.<br>
<br></div><div>I found a "remove formatting" button in gmail's composer, and used it on this message.  Does this message look like plain text?<br><br></div><div>I'm not really prepared to give up gmail's quick searching; I used to index my e-mails using pyindex and dovecot, but happily I don't need to anymore.<br>
<br></div></div></div></div>