mattn / go-oci8

Oracle driver for Go using database/sql
https://mattn.kaoriya.net/
MIT License
630 stars 212 forks source link

All chinese character show as '?????????????' #340

Closed toplinuxsir closed 5 years ago

toplinuxsir commented 5 years ago

All chinese character show as '?????????????'

I set the env with : os.Setenv("NLS_LANG", "SIMPLIFIED CHINESE_CHINA.AL32UTF8") and then query and scan But all the chinese character show as ?????

Can anybody help me ? Thanks!

MichaelS11 commented 5 years ago

Did you try the default AMERICAN_AMERICA.AL32UTF8 ?

toplinuxsir commented 5 years ago

I have tested with "AMERICAN_AMERICA.AL32UTF8", But with same result!

MichaelS11 commented 5 years ago

It is hard to say where the issue is located. What language is the database in? Do you have reproducible code where you insert the characters and then select the characters?

Also would suggest look over past issues, this is a common issue that comes up.

toplinuxsir commented 5 years ago

I switch to goracle ,Everything is ok

toplinuxsir commented 5 years ago

MY database language SELECT sys_context('userenv','language') from dual; output SIMPLIFIED CHINESE_CHINA.AL32UTF8 Anyway , Hope to fix the bug .

MichaelS11 commented 5 years ago

@toplinuxsir Sounds like you are going to use goracle instead. Can you please close this issue?

robinsoon commented 5 years ago

Incorrect Oracle driver version, or Multiple drivers are installed in the system. UTF8 , Client and server configurations must be consistent。

MichaelS11 commented 5 years ago

@mattn Close this? Not much else we can do with this issue at this time.