Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zhua03 opened this issue Feb 6, 2021 · 0 comments
Labels

Comments

@zhua03
Copy link

zhua03 commented Feb 6, 2021

  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)

@zhua03 zhua03 added the question label Feb 6, 2021
@cjbj cjbj added bug and removed question labels Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants