Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese Display unnormal #41

Open
GoogleCodeExporter opened this issue Jun 4, 2015 · 1 comment
Open

Chinese Display unnormal #41

GoogleCodeExporter opened this issue Jun 4, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.open the test script.
2.add "Chinese" colum in head
3.add more cloum "阿斯达" to each row. run the test script.

What is the expected output? What do you see instead?
+--------+------------+----------+---------+
| Kanji  |  Hiragana  | English  | Chinese |
+--------+------------+----------+---------+
|  神戸  |   こうべ   |   Kobe   |  阿斯达 |
|  京都  |  きょうと  |  Kyoto   |  阿斯达 |
|  長崎  |  ながさき  | Nagasaki |  阿斯达 |
| 名古屋 |   なごや   |  Nagoya  |  阿斯达 |
|  大阪  |  おおさか  |  Osaka   |  阿斯达 |
|  札幌  |  さっぽろ  | Sapporo  |  阿斯达 |
|  東京  | とうきょう |  Tokyo   |  阿斯达 |
|  横浜  |  よこはま  | Yokohama |  阿斯达 |
+--------+------------+----------+---------+

Instead:
+--------+------------+----------+---------+
| Kanji  |  Hiragana  | English  | Chinese |
+--------+------------+----------+---------+
|  神戸  |   こうべ   |   Kobe   |  阿斯达 |
|  京都  |  きょうと  |  Kyoto   |  阿斯达 |
|  長崎  |  ながさき  | Nagasaki |  阿斯达 |
| 名古屋 |   なごや   |  Nagoya  |  阿斯达 |
|  大阪  |  おおさか  |  Osaka   |  阿斯达 |
|  札幌  |  さっぽろ  | Sapporo  |  阿斯达 |
|  東京  | とうきょう |  Tokyo   |  阿斯达 |
|  横浜  |  よこはま  | Yokohama |  阿斯达 |
+--------+------------+----------+---------+| とうきょう |  Tokyo   |  
阿斯达 |
|  横浜  |  よこはま  | Yokohama |  阿斯达 |
+--------+------------+----------+---------+------------+----------+---------+

code(changed):
class PrintJapanestTest(unittest.TestCase):

    def setUp(self):

        self.x = PrettyTable(["Kanji", "Hiragana", "English", "Chinese"])
        self.x.add_row(["神戸", "こうべ", "Kobe", "阿斯达"])
        self.x.add_row(["京都", "きょうと", "Kyoto", "阿斯达"])
        self.x.add_row(["長崎", "ながさき", "Nagasaki", "阿斯达"])
        self.x.add_row(["名古屋", "なごや", "Nagoya", "阿斯达"])
        self.x.add_row(["大阪", "おおさか", "Osaka", "阿斯达"])
        self.x.add_row(["札幌", "さっぽろ", "Sapporo", "阿斯达"])
        self.x.add_row(["東京", "とうきょう", "Tokyo", "阿斯达"])
        self.x.add_row(["横浜", "よこはま", "Yokohama", "阿斯达"])

    def testPrint(self):
        print()
        print(self.x)

What version of the product are you using? On what operating system?
v0.7.2 Win7 x86

Please provide any additional information below.
modify the main script ,the main method to test, also has problom.
shows:
+--------------------+-------+------------+-----------------+
| City name          |  Area | Population | Annual Rainfall |
+--------------------+-------+------------+-----------------+
| Sydney             | 2058d |  4336374   |     1214.8f     |
| Perth              | 5386d |  1554769   |      869.4f     |
| Melbourne          | 1566d |  3806092   |      646.9f     |
| Hobart             | 1357d |   205556   |      619.5f     |
| Darwin啊大声大声道 | 0112d |   120900   |     1714.7f     |
| Brisbane           | 5905d |  1857594   |     1146.4f     |
| Adel我啊是         | 1295d |  1158259   |      600.5f     |
+--------------------+-------+------------+-----------------+-----------------+

extra one cloum in last row.


Original issue reported on code.google.com by [email protected] on 21 Nov 2013 at 8:43

@GoogleCodeExporter
Copy link
Author

Thank you for reporting this problem.  I will investigate this to see if I can 
fix it.  It's important to me that PrettyTable works correctly for as many 
different languages as possible, so I will take this issue seriously.

Original comment by [email protected] on 24 Nov 2013 at 7:23

  • Changed state: Accepted
  • Added labels: Priority-High
  • Removed labels: Priority-Medium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant