Questions on XML

joy99 subhakolkata1234 at gmail.com
Sat Aug 22 22:53:16 CEST 2009


On Aug 22, 12:16 pm, Rami Chowdhury <rami.chowdh... at gmail.com> wrote:
> > encoding declaration to the top of your source file if you use encoded
> > literal strings in your code
>
> Any tips for how to set the encoding in IDLE? printing the Unicode  
> strings works -- trying to repr() the variable chokes with a  
> UnicodeDecodeError, and trying to enter the literals inside IDLE just  
> gets me '?' characters instead.
>
> (this is Python 2.5 + IDLE installed from the Python-2.5.msi on  
> python.org)
>
> -------------
> Rami Chowdhury
> "Never assume malice when stupidity will suffice." -- Hanlon's Razor
> 408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)
>
> On Aug 21, 2009, at 22:53 , Stefan Behnel wrote:
>
>
>
> > Rami Chowdhury wrote:
> >>> I am using primarily UTF-8 based strings, like Hindi or Bengali.  
> >>> Can I
> >>> use Python to help me in this regard?
>
> >> I can say from experience that Python on Windows (at least, Python  
> >> 2.5
> >> on 32-bit Vista) works perfectly well with UTF-8 files containing
> >> Bangla. I have had trouble with working with the data in IDLE,  
> >> however,
> >> which seems to prefer ASCII by default.
>
> > Defaults almost never work for encodings. You have to be explicit:  
> > add an
> > encoding declaration to the top of your source file if you use encoded
> > literal strings in your code; use the codecs module with a suitable
> > encoding to read encoded text files, and use an XML parser when  
> > reading XML.
>
> > Stefan
> > --
> >http://mail.python.org/mailman/listinfo/python-list- Hide quoted text -
>
> - Show quoted text -

Dear Sir,

There is no big issue for this. I simply downloaded Python2.5 and
using IDLE on Windows XP with service pack 2. I used Python 2.5
earlier and presently using Python 2.6 and it is also perfectly fine.
I am not using it for small programs but machine learning programs,
where code itself runs few million lines over some terabytes of Hindi
and Bengali data, and I never found any problem. What is the exact
nature of problem you are getting? If you can kindly specify. If
possible, with some sample codes. And printing is also never been a
problem, all good printers like HP,Epson,Xerox,Canon are printing
Hindi or Bengali data finely.
If you can kindly specify the problem.

Best Regards,
Subhabrata.



More information about the Python-list mailing list