kragniz / kragniz/prettytable

Cannot print unicode characters, for example: degree symbol °

Open
#60 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
What steps will reproduce the problem?
1. Assign a Unicode character
2. Insert it into a PrettyTable
3. Try to print it

What is the expected output? What do you see instead?
I expect degree symbol "°" to print, but instead it prints "°".

What version of the product are you using? On what operating system?
Using PrettyTables v0.7.2 on Python 2.7 using PyScripter.

Please provide any additional information below.
Try the following code and you will see:
from prettytable import PrettyTable
deg= u'\N{DEGREE SIGN}'
print "degree symbol goes here normally:" , deg
x = PrettyTable(["Title"])
x.add_row([deg])
print x

```

Original issue reported on code.google.com by `cargocr...@gmail.com` on 23 Oct 2014 at 8:53

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the provided Python 2.7 reproduction with PrettyTable and trace how the Unicode value moves through PrettyTable before printing. Done means the degree symbol is rendered as ° rather than ° in the table output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.