Closed nenadnoveljic closed 7 months ago
OK i fix it but i need some example string to test also
Thanks. What do you mean by example string? The test case select AAA
.
Glad to find someone using same characterset #441. Can I ask you how you are using it for now?
I'm currently using godror, but I'm not sure I'm using it correctly (https://github.com/godror/godror/issues/313)
Thinking of migrating to go-ora but not sure.
Can i ask you how you are using it for now?
godror
works correctly. Would like to go back to go-ora
if it gets fixed.
Do you set charset in DSN? godror maintainer says that I should not use it. But It doesn't work. The only way I could make it work was set charset in DSN, encode string to euckr manually.
Do you set charset in DSN?
I'm not setting charset in DSN. This thread isn't the best place for discussing godror
.
I'm sorry. But thanks for the response.
fixed v2.8.1
Is it fixed? WIthout setstringconverter
, code above stills output "???"
Tested with 2.8.4 and oracle db
docker run -d -p 1521:1521 -e ORACLE_PASSWORD=toor acadx0/oracle-xe:18.4.0-faststart-KO16MSWIN949
you can use this for testing:
package main
import (
"fmt"
"github.com/sijms/go-ora/v2/converters"
)
func print(conv converters.IStringConverter, value string) {
encoded := conv.Encode(value)
fmt.Println(encoded)
decoded := conv.Decode(encoded)
fmt.Println(decoded)
}
func main() {
fmt.Println("Use charset id: 846")
conv := converters.NewStringConverter(846)
print(conv, "안녕하세요")
print(conv, "AAA")
fmt.Println("")
fmt.Println("Use charset id: 833")
conv = converters.NewStringConverter(833)
print(conv, "お会計お願いしますABCD")
fmt.Println("")
fmt.Println("Use charset id: 834")
conv = converters.NewStringConverter(834)
print(conv, "お会計お願いしますABCD")
fmt.Println("")
fmt.Println("Use charset id: 838")
conv = converters.NewStringConverter(838)
print(conv, "お会計お願いしますABCD")
fmt.Println("")
fmt.Println("Use charset id: 852")
conv = converters.NewStringConverter(852)
print(conv, "这是我年轻时候住的房子")
}
I use your docker image + code above result:
fetched value: AAA
Output:
fetched value: ???
instead offetched value: AAA