Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Help: printing Unicode characters during telnet session

Reply
Thread Tools

Help: printing Unicode characters during telnet session

 
 
Pekka Niiranen
Guest
Posts: n/a
 
      06-24-2003
Hi,

I have a multiuser script, that I would like to convert to Python.
The users open simultaneous telnet -sessions from win2000 to
an unix machine and possibly edit unicode textfiles. Currently users
use vi and more, but I would like to add unicode support to the script.
I would not like to force them to open X-sessions in order to show
Multilanguage characters.

Should I create python shell or is there any other way ?
Python's "print" does not seem to work for all characters

Do not bother to point me to the existing FAQ and tutorials, because
they do not provide solutions for this problem (searched whole day
allready).

-pekka-

 
Reply With Quote
 
 
 
 
vincent wehren
Guest
Posts: n/a
 
      06-24-2003

"Pekka Niiranen" <(E-Mail Removed)> schrieb im Newsbeitrag
news:bda6re$uts$(E-Mail Removed)...
> Hi,
>
> I have a multiuser script, that I would like to convert to Python.
> The users open simultaneous telnet -sessions from win2000 to
> an unix machine and possibly edit unicode textfiles. Currently users
> use vi and more, but I would like to add unicode support to the script.
> I would not like to force them to open X-sessions in order to show
> Multilanguage characters.
>
> Should I create python shell or is there any other way ?
> Python's "print" does not seem to work for all characters


What do you mean? For which characters doesn't the print statement work?

Vincent Wehren
>
> Do not bother to point me to the existing FAQ and tutorials, because
> they do not provide solutions for this problem (searched whole day
> allready).
>
> -pekka-
>



 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Guest
Posts: n/a
 
      06-24-2003
Pekka Niiranen wrote:

> Should I create python shell or is there any other way ?


If, by "shell", you mean the Windows terminal window:

This can only display a limited number of characters. This is
not inherently a limitation of python, but of the terminal
window - this system component uses a certain font, and that
font only supports so many characters.

To get support for more characters, you need to do a number of
things:
a) use a console font with more characters, e.g. Lucida Console,
b) use a console code page that has all the characters that you
want to display.
c) tell the editor on the other end to convert the text file,
for display, to the code page that your terminal supports

There is nothing Python could do for you to improve this
situation. You might consider using a different terminal
emulation, though.

Regards,
Martin

 
Reply With Quote
 
Fredrik Lundh
Guest
Posts: n/a
 
      06-24-2003
Pekka Niiranen wrote:

> Python's "print" does not seem to work for all characters


maybe you should define "does not seem to work", so we don't
have to guess...

> Do not bother to point me to the existing FAQ and tutorials, because
> they do not provide solutions for this problem (searched whole day
> allready).


do you get "ASCII encoding error: ordinal not in range(12"?

If so, Google returns 641 hits for that error message. The third hit is
a "Python Unicode Tutorial" which shows you how to use the "encode"
method to turn unicode strings into encoded 8-bit strings, suitable for
printing...

</F>




 
Reply With Quote
 
Martin v. =?iso-8859-15?q?L=F6wis?=
Guest
Posts: n/a
 
      06-25-2003
Pekka Niiranen <(E-Mail Removed)> writes:

> How about adding better font to Python distribution ?


-1. Dealing with operating system fonts is not our business.

Regards,
Martin
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python unicode utf-8 characters and MySQL unicode utf-8 characters Grzegorz Śliwiński Python 2 01-19-2011 07:31 AM
Re: convert unicode characters to visibly similar ascii characters Laszlo Nagy Python 6 07-02-2008 04:42 PM
Re: convert unicode characters to visibly similar ascii characters M.-A. Lemburg Python 0 07-02-2008 08:39 AM
Re: convert unicode characters to visibly similar ascii characters Terry Reedy Python 0 07-01-2008 07:46 PM
Telnet - attempting to initiate a telnet session within an established telnet session Carcarius Ruby 0 12-06-2007 03:26 AM



Advertisments