Skip to content

Cursor.description internal_size=4 against db charset WE8DEC/JA16EUC/ZHS16GBK #531

Open
@zhua03

Description

@zhua03
  1. What versions are you using?

DB version 19.8.0.0.0 , with db charset WE8DEC/JA16EUC/ZHS16GBK
cx_Oracle.version: 8.0.1
cx_Oracle.clientversion: (19, 8, 0, 0, 0)

  1. Describe the problem

internal_size, the Cursor.description contains information about column, is 4 against Db charset WE8DEC (max byte length is 1 )/JA16EUC (max byte length is 3)/ ZHS16GBK (max byte length is 2)
But the value is correct against db charset AL32UTF8, i.e, for US char internal_size=1, European char internal_size=2, S-Chinese char internal_size=3, Supplementary char internal_size=4.

  1. Include a runnable Python script that shows the problem.

import cx_Oracle

conn = cx_Oracle.connect(...)
cursor = conn.cursor()
cursor.execute("select 'X' from dual")
col, = cursor.description
value = col[3]
print('internal_size is', value)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions