Re: Support for Devanagari Script
Vijaya Poudyal <[email protected]> Fri, 8 Sep 2006 04:31:34 -0700 (PDT)
| Newsgroups | gmane.comp.python.internationalization |
|---|---|
| Message-ID | <[email protected]> |
--===============0232372997== Content-Type: multipart/alternative; boundary="0-911331035-1157715094=:82460" Content-Transfer-Encoding: 8bit --0-911331035-1157715094=:82460 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Andy, Thanks for investigating this. I am using IDLE in windows 2000 and XP. I will try the variations you tried and will report the results. Thanks. vjktm Andy Robinson <[email protected]> wrote: > The main determining factor is whether the stdout can render the > bytestream that's thrown at it, and that depends on where you are > running your script. For example, on Windows, IDLE renders your UTF16 > exactly the same as Firefox, Opera and IE6 render the UTF8 in the > created ex2.html. However running the script at the (DOS) command prompt > will throw an exception (unless there's a Devanagari DOS codepage). Regrettably not all fonts have the character set you want and the DOS prompt is not a smart enough display device. However, browsers and IDLE are smart enough to switch to a 'fallback font' for characters they cannot display. In Idle, which uses Courier (300kb on Windows), I get; >>> print kSa.encode('UTF-8') works fine. >>> print kSa.encode('UTF-16') prints rubbish. >>> print kSa works too but is almost certainly converting to utf8. >From a DOS prompt, the UTF8 version prints rubbish. The command prompt font properties only give me two font choices, 'Raster Fonts' and 'Lucida Console'. When I switch IDLE to a variety of different fonts, I still get the Devanagari character, IN THE SAME TYPEFACE, whichever font I choose. Conclusion: DOS prompt does not have the display routines needed to handle Unicode output. - Andy Robinson --------------------------------- Want to be your own boss? Learn how on Yahoo! Small Business. --0-911331035-1157715094=:82460 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit <div>Andy,</div> <div>Thanks for investigating this. I am using IDLE in windows 2000 and XP.</div> <div> </div> <div>I will try the variations you tried and will report the results.</div> <div> </div> <div>Thanks.</div> <div>vjktm<BR><BR><B><I>Andy Robinson <[email protected]></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">> The main determining factor is whether the stdout can render the <BR>> bytestream that's thrown at it, and that depends on where you are <BR>> running your script. For example, on Windows, IDLE renders your UTF16 <BR>> exactly the same as Firefox, Opera and IE6 render the UTF8 in the <BR>> created ex2.html. However running the script at the (DOS) command prompt <BR>> will throw an exception (unless there's a Devanagari DOS codepage).<BR><BR>Regre ttably not all fonts have the character set you want and the DOS <BR>prompt is not a smart enough display device. However, browsers and IDLE <BR>are smart enough to switch to a 'fallback font' for characters they <BR>cannot display.<BR><BR>In Idle, which uses Courier (300kb on Windows), I get;<BR><BR>>>> print kSa.encode('UTF-8')<BR><BR>works fine.<BR><BR>>>> print kSa.encode('UTF-16')<BR><BR>prints rubbish.<BR><BR>>>> print kSa<BR>works too but is almost certainly converting to utf8.<BR><BR>From a DOS prompt, the UTF8 version prints rubbish. The command prompt <BR>font properties only give me two font choices, 'Raster Fonts' and <BR>'Lucida Console'. When I switch IDLE to a variety of different fonts, I <BR>still get the Devanagari character, IN THE SAME TYPEFACE, whichever font <BR>I choose.<BR><BR>Conclusion: DOS prompt does not have the display routines needed to <BR>handle Unicode output.<BR><BR>- Andy Robinson<BR><BR><BR></BLOCKQUOTE><BR ><p>  <hr size=1>Want to be your own boss? Learn how on <a href="http://us.rd.yahoo.com/evt=41244/*http://smallbusiness.yahoo.com/r-index"> Yahoo! Small Business.</a> --0-911331035-1157715094=:82460-- --===============0232372997== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ I18n-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/i18n-sig --===============0232372997==--