Am 25.11.2015 um 07:40 schrieb Philipp Hahn:
What about a unicode character where the second or third octet falls
into the '0' to '9' range? It seems to me that we really need unicode
versions of ctype functions.
Will not happen: All subsequent bytes of UNICODE characters encoded in
UTF-8 will have the MSB set. See `man 7 utf8`
Good point. Anyway, the whole code is only there to skip over the
currency sign in money values - a simple hack is good enough for that.
Also, I consider the whole idea of converting money output to decimal in
getresult() and dictresult() a hack. The main advantage of money over
numeric is to have the currency in it, so why do we remove it on output?
That's why I have now added an option to return the output as string
with currency sign which in my view should become the default. If you
are only interested in the numeric value, then you can simply return it
as money_column::numeric which is a much cleaner solution.
-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql