[spe.pycs.net] Re: Unicode Encoding?

Chris Spencer ckspencer at verizon.net
Wed Nov 24 06:40:50 CET 2004


www.stani.be wrote:

> That's what I started to think of implementing: a drop
> down list in the preferences dialog box. Which list
> should it consist of? What are common encoding
> formats? Is there somewhere a list on the internet?
> Suggestions are welcome. 

Well, you should probably only worry about what's listed at:
http://docs.python.org/lib/node127.html
since those are the encodings Python supports by default. There might be 
more, but that's a good place to start.

> What I also could do is that spe changes the default
> encoding to the value of the preference box and
> restore the previous value when spe exits.
> 
> 
>>or let 
>>the SPE auto-detect the encoding for each file.
> 
> Is there any python library/algorithm for this. It
> seems a bit risky to me.

I'm not sure. Auto-detecting the encoding from scratch is practically 
impossible, but what Firefox does is allow you to narrow the field to 
say, "Auto-detect Japanese", and then it tries to determine which of the 
3 or 4 Japanese encodings should be used. Of course, this isn't 
absolutely necessary. Just allowing the user to select the encoding 
manually should be fine for most cases.




More information about the Spe-user mailing list