#1203: Non ascii chars in table names
-----------------------+----------------------------------------------------
  Reporter:  raffaele  |       Owner:  ed                           
      Type:  defect    |      Status:  assigned                     
  Priority:  minor     |   Milestone:  0.9.2                        
 Component:  ide       |     Version:  0.9.0                        
Resolution:            |    Keywords:  UnicodeEncodeError tablenames
-----------------------+----------------------------------------------------
Changes (by raffaele):

  * version:  0.9.1 => 0.9.0

Comment:

 Ok.
 I've played with the code a bit.
 I succeeded in creating a sample app on top of a postgresql database with
 case-sensitive table names and non ascii chars in table/fields names.
 I've modified the dabo source code as per attached files. Obviously this
 is only a suggestion, but enables dabo to use non ascii chars both in the
 appwizard and in the resulting application.
 The generated application still needs some manual adjustment (e.g. the non
 ascii chars are not accepted by python in class names, so you need to
 replace them manually with ascii ones) but it works.

 the information you requested is here:

 Platform: GTK
 Python Version: 2.5.2 on linux2
 Dabo Version: Version 0.9.0; Revision ~4816
 UI Version: 2.8.9.1 on wxGTK (gtk2)
 Architecture: x86_64
 Postgres version: 8.3.6


 Traceback with dbPostgresQL.py unmodified

         Traceback (most recent call last):
           File "./ide/wizards/AppWizard/AppWizard.py", line 305, in
 onLeavePage
             tables = cursor.getTables()
           File "/usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/db/dCursorMixin.py", line 1866, in
 getTables
             return self.BackendObject.getTables(self.AuxCursor,
 includeSystemTables)
           File "/usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/db/dbPostgreSQL.py", line 75, in
 getTables
             cursor.execute(sqltablestr)
           File "/usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/db/dCursorMixin.py", line 326, in
 execute
             raise dException.DBQueryException(e, sql)
         DBQueryException: <unprintable DBQueryException object>



 Traceback with dBackend.py, dGrid.py, dPemMixin.py and AppWizard.py
 unmodified

         Traceback (most recent call last):
           File "/usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/ui/uiwx/dControlMixin.py", line 27, in
 _onWxHit
             self.raiseEvent(dEvents.Hit, evt, *args, **kwargs)
           File "/usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/ui/uiwx/dPemMixin.py", line 925, in
 raiseEvent
             super(dPemMixin, self).raiseEvent(eventClass, nativeEvent,
 *args, **kwargs)
           File "/usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/lib/eventMixin.py", line 92, in
 raiseEvent
             bindingFunction(event)
           File "/usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/ui/dialogs/Wizard.py", line 122, in
 onNext
             self._finish()
           File "/usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/ui/dialogs/Wizard.py", line 138, in
 _finish
             ok = pg.onLeavePage("forward")
           File "/home/Tigrotto/Documenti/Sviluppo
 GesaGAS/dabo/ide/wizards/AppWizard/AppWizard.py", line 544, in onLeavePage
             if not self.Form.createApp():
           File "/home/Tigrotto/Documenti/Sviluppo
 GesaGAS/dabo/ide/wizards/AppWizard/AppWizard.py", line 689, in createApp
             f.write(self.getBizobj(td, table))
         UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0'
 in position 1215: ordinal not in range(128)






 Modified files

 file:///usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/db/dBackend.py
 file:///usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/db/dbPostgreSQL.py
 file:///usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/ui/uiwx/dGrid.py
 file:///usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/ui/uiwx/dForm.py
 file:///usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/ui/uiwx/dPemMixin.py
 file:///usr/lib/python2.5/site-
 packages/Dabo-0.9.0-py2.5.egg/dabo/lib/datanav/Form.py
 
file:///home/Tigrotto/Documenti/Sviluppo%20GesaGAS/dabo/ide/wizards/AppWizard/AppWizard.py

-- 
Ticket URL: <http://trac.dabodev.com/ticket/1203#comment:3>
Dabo Trac <http://trac.dabodev.com>
Trac Page for Dabo

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to