'detect if the decimal separator character is not \'.\', as
is the case with european locale settings for NLS_LANG.
cx_oracle itself uses similar logic when it formats Python
Decimal objects to strings on the bind side (as of 5.0.3),
as Oracle sends/receives string numerics only in the
current locale.'

def _detect_decimal_char(self, connection):

    if (self.cx_oracle_ver < (5,)):
        return
    cx_Oracle = self.dbapi
    conn = connection.connection
    def output_type_handler(cursor, name, defaultType, size, precision, scale):
        return cursor.var(cx_Oracle.STRING, 255, arraysize=cursor.arraysize)
    cursor = conn.cursor()
    cursor.outputtypehandler = output_type_handler
    cursor.execute('SELECT    0.1    FROM    DUAL')
    val = cursor.fetchone()[0]
    cursor.close()
    char = re.match('([\\.,])', val).group(1)
    if (char != '.'):
        _detect_decimal = self._detect_decimal
        self._detect_decimal = (lambda value: _detect_decimal(value.replace(char, '.')))
        self._to_decimal = (lambda value: decimal.Decimal(value.replace(char, '.')))
