|
From: | Michael Terry |
Subject: | Re: [Beaver-devel] Gettext and stuff |
Date: | Mon, 17 Mar 2003 13:57:52 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030224 |
Leslie Polzer wrote:
In my opinion we should stick to my proposal but also insert a choice "auto-detect/guess". Sylpheed, my mail client, a quite excellent program IMHO, does it justthat way. I've even found some code for it in a tool called asrecod (guess.c attachedto this mail). I haven't fully understood the code there but it seems to look out for certain char patterns. Sylpheed's code might be interesting, too.
Yeah, that guess.c code is neat. It seems to give weights to various characters it sees and whichever charset has the highest weighting at the end wins.
Your suggestion is fine. However, I got the feeling that a dialog would be displayed to the user if it wasn't UTF-8? I don't think we should bother -- if it is not UTF-8, just convert it. No need to tell them about it. The less intrusive this is, the better.
Maybe put these options under Edit->Encoding?
I didn't get too far into the problem, but I did notice that converting to my locale's charset didn't help the problem at all.I used g_convert_with_iconv() with ISO-8859-1 as the source charset and Beaver's TextView accepted it happily as valid UTF8. Have a look at editor.c:~220, it's already there. Try it.
Cool. -mt
pgpt9_Ur1IMAk.pgp
Description: PGP signature
[Prev in Thread] | Current Thread | [Next in Thread] |