@@ -246,7 +246,7 @@ def dbTables(self, dbTables):
246246 if table and isListLike (table ):
247247 table = table [0 ]
248248
249- maxlength = max (maxlength , len (unsafeSQLIdentificatorNaming (normalizeUnicode ( table ) or getUnicode (table ))))
249+ maxlength = max (maxlength , getConsoleLength (unsafeSQLIdentificatorNaming (getUnicode (table ))))
250250
251251 lines = "-" * (int (maxlength ) + 2 )
252252
@@ -267,7 +267,7 @@ def dbTables(self, dbTables):
267267 table = table [0 ]
268268
269269 table = unsafeSQLIdentificatorNaming (table )
270- blank = " " * (maxlength - len ( normalizeUnicode ( table ) or getUnicode (table )))
270+ blank = " " * (maxlength - getConsoleLength ( getUnicode (table )))
271271 self ._write ("| %s%s |" % (table , blank ))
272272
273273 self ._write ("+%s+\n " % lines )
@@ -362,7 +362,7 @@ def dbTablesCount(self, dbTables):
362362 for ctables in dbTables .values ():
363363 for tables in ctables .values ():
364364 for table in tables :
365- maxlength1 = max (maxlength1 , len ( normalizeUnicode ( table ) or getUnicode (table )))
365+ maxlength1 = max (maxlength1 , getConsoleLength ( getUnicode (table )))
366366
367367 for db , counts in dbTables .items ():
368368 self ._write ("Database: %s" % unsafeSQLIdentificatorNaming (db ) if db else "Current database" )
@@ -388,7 +388,7 @@ def dbTablesCount(self, dbTables):
388388 tables .sort (key = lambda _ : _ .lower () if hasattr (_ , "lower" ) else _ )
389389
390390 for table in tables :
391- blank1 = " " * (maxlength1 - len ( normalizeUnicode ( table ) or getUnicode (table )))
391+ blank1 = " " * (maxlength1 - getConsoleLength ( getUnicode (table )))
392392 blank2 = " " * (maxlength2 - len (str (count )))
393393 self ._write ("| %s%s | %d%s |" % (table , blank1 , count , blank2 ))
394394
0 commit comments