"Uwe Grauer" <[EMAIL PROTECTED]> schrieb:
>
> You have to overwrite dApp:
> #---------------------------------------------------------------------
> # -*- coding: utf-8 -*-
>
> import dabo
> from dabo.dLocalize import _
>
> class ugApp(dabo.dApp):
> def getConnectionByName(self, connName):
> """Given the name of a connection, returns the actual
> connection. Stores the connection so that multiple requests
> for the same named connection will not open multiple
> connections. If the name doesn't exist in self.dbConnectionDefs,
> then None is returned.
> """
> if not self.dbConnections.has_key(connName):
> if self.dbConnectionDefs.has_key(connName):
> ci = self.dbConnectionDefs[connName]
> if self.Charset == None:
> self.dbConnections[connName] = dabo.db.dConnection(ci)
> else:
> self.dbConnections[connName] =
> dabo.db.dConnection(ci, charset=self.Charset)
> try:
> ret = self.dbConnections[connName]
> except KeyError:
> ret = None
> return ret
>
> def _getCharset(self):
> try:
> return self._charset
> except AttributeError:
> return None
>
> def _setCharset(self, value):
> self._charset = value
>
> Charset = property(_getCharset, _setCharset, None,
> _("Connection charset to be used (string)") )
>
> #---------------------------------------------------------------------
And then in the main() function of the Dabo application:
app = dApp(charset='utf8')
or whatever. Right? I looked at the dApp.py and dObject.py, but didn't
find _extractKeywordProperties(). Will try it out. Thank you for the
code! I suppose for Firebird this is needed more or less always, isn't
it?
Additional question: if the application isn't all in one file, what's
the best place for an overwritten dApp class? Together with the main()
function?
>
> BTW, i tested the prerelease version of kinterbasdb:
> http://www.firebirdsql.org/download/prerelease/python/
> and found that UTF8 support improved.
>
Thank you for the information and the link. I just got the files but
didn't install them yet.
Greetings
Sibylle
--
Dr. Sibylle Koczian
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]