Re: [Ilugc] [ilugc] How to print unicode charecter in terminal

2011-11-21 Thread Sathia S


 One way to debug this is to try to redirect the output to a .txt or
 .html file and check the output in gedit or firefox browser that
 understands the encoding.

 Ok I will check this.


#1 Please put a header, copyright, license info if you are releasing
 code to the public.

 #2 You might want to give a detailed example on how to use your
 program in the README with examples. I am not sure if you expect
 English/Tamil text as input at various prompts.

 #3 Add your contact e-mail address in the README

 #4 Your exception cases need to be clearly specific. If you test for
 Internet connectivity, then clearly say so.

 #5 You have imported re, codecs, textwrap and not used it in the code

 #6 It is good practice to check function return values before
 proceeding to use them in your code

 #7 Please add docstring when you write Python code

 #8 Avoid magic numbers and strings, please. Move all your prompt
 strings to separate variables, so tomorrow if you have to change them
 you only have to do it once

 #9 Fix your indentation

 #10 Run pylint on your code and fix the warnings

  Thank you for your suggestion. ok i will change all these corrections and
will update the code.



-- 
Regards

sathia
http://www.sathia27.wordpress.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


[Ilugc] [ilugc] How to print unicode charecter in terminal

2011-11-20 Thread Sathia S
Hi,

I created a terminal based English to tamil dictionary application with
python.

This fetches data from http://ta.wiktionary.org/wiki/ and displays the
output in terminal.

Problem is that it does not print tamil font clearly. I cannot read that
font. Eventhough I

installed tamil font in my system. What is way to print unicode character
in terminal ?

Please see output (problem) here
http://sathia27.files.wordpress.com/2011/11/screenshot-2.png?w=1200h= .

and my code is https://github.com/sathia27/e2t-dictionary.

Please give your suggestion about the code and also help regarding the
problem i got.


Thank you in advance

-- 
Regards

sathia
http://www.sathia27.wordpress.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [ilugc] How to print unicode charecter in terminal

2011-11-20 Thread 0

 Problem is that it does not print tamil font clearly. I cannot read that
 font. Eventhough I

 installed tamil font in my system. What is way to print unicode character
 in terminal ?


What terminal emulator are you using ? I have tried tamil characters on 
both xterm (248) and gnome-terminal (2.28.1). Even if you set the 
terminal emulator to UTF-8 mode, xterm just doesn't know tamil while 
gnome-terminal doesn't use fixed width to display tamil characters which 
is what seems like happening in your case. Try the following in the 
command line,

echo -e #\0340\0256\0205#

If you notice that the tamil character is not between the '#' characters 
but instead overlaps with one, thats the problem ur facing then. I don't 
know of a solution to this, other than considering tamil characters to 
take twice the width and leave a space between some tamil characters you 
print.

-- 
0
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [ilugc] How to print unicode charecter in terminal

2011-11-20 Thread Sathia S
Hi. Thank you for your reply.


 What terminal emulator are you using ? I have tried tamil characters on
 both xterm (248) and gnome-terminal (2.28.1).


gnome-terminal


 echo -e #\0340\0256\0205#

 If you notice that the tamil character is not between the '#' characters
 but instead overlaps with one, thats the problem ur facing then.


#அ#. Yes character was get overlapping as you said.


 I don't
 know of a solution to this, other than considering tamil characters to
 take twice the width and leave a space between some tamil characters you
 print.


Ok i will do that

Thank you


-- 
Regards

sathia
http://www.sathia27.wordpress.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [ilugc] How to print unicode charecter in terminal

2011-11-20 Thread Shakthi Kannan
Hi,

--- On Sun, Nov 20, 2011 at 6:35 PM, Sathia S sathia2...@gmail.com wrote:
| This fetches data from http://ta.wiktionary.org/wiki/ and displays the
| output in terminal.
|
| Problem is that it does not print tamil font clearly. I cannot read that
| font.
\--

One way to debug this is to try to redirect the output to a .txt or
.html file and check the output in gedit or firefox browser that
understands the encoding.

If rendered correctly, then the problem is with the gnome-terminal.

#1 Please put a header, copyright, license info if you are releasing
code to the public.

#2 You might want to give a detailed example on how to use your
program in the README with examples. I am not sure if you expect
English/Tamil text as input at various prompts.

#3 Add your contact e-mail address in the README

#4 Your exception cases need to be clearly specific. If you test for
Internet connectivity, then clearly say so.

#5 You have imported re, codecs, textwrap and not used it in the code

#6 It is good practice to check function return values before
proceeding to use them in your code

#7 Please add docstring when you write Python code

#8 Avoid magic numbers and strings, please. Move all your prompt
strings to separate variables, so tomorrow if you have to change them
you only have to do it once

#9 Fix your indentation

#10 Run pylint on your code and fix the warnings

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc