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

Can't create utf8 to ucs2 convertor #1

Closed
dimdin opened this issue Apr 15, 2014 · 3 comments
Closed

Can't create utf8 to ucs2 convertor #1

dimdin opened this issue Apr 15, 2014 · 3 comments

Comments

@dimdin
Copy link
Collaborator

dimdin commented Apr 15, 2014

I am getting:
panic: Can't create utf8 to ucs2 convertor: invalid argument

"ucs2" does not exist in the list of iconv 1.11 encodings (default Mac OS X setup).
"UCS-2" is accepted but does not work because it uses big endian encoding.
"UCS-2LE" works and I was able to succesfully connect to an SQL Server from Mac OS X by changing the following lines in tds.go:
utf82ucs2, err = iconv.NewConverter("utf8", "ucs-2LE")
ucs22utf8, err = iconv.NewConverter("ucs-2LE", "utf8")

By the way, it seems overkill the iconv dependency for converting between utf-8 and ucs2.

@hochhaus
Copy link
Contributor

I'm working on a patch go remove the iconv-go dependency. Hopefully it will address this issue too. (Also I'm fixing the compile on 32-bit.)

I'll try to get this sent out for review by denisenkom later today. Sorry for the delay.

@hochhaus
Copy link
Contributor

I think this pull request will resolve your issue:

#2

Can you test it out once?

@dimdin
Copy link
Collaborator Author

dimdin commented Apr 17, 2014

Thank you, it resoves the issue.

@dimdin dimdin closed this as completed Apr 17, 2014
zcolleen pushed a commit to zcolleen/go-mssqldb that referenced this issue Nov 14, 2022
* add kerberos auth

* added kerberos auth

* Krb auth (denisenkom#1)

* add windows stub for krb

* add import for msdsn

* fix ci lint issue

Co-authored-by: chandan jain <[email protected]>

* build tag for go 1.13

* Remove krb dep (denisenkom#2)

* remove krb dep for windows

* remove krb dep

* unit test coverage

Co-authored-by: chandan jain <[email protected]>

* add Kerberos and KerberosConfig structs

* make krb cache and keyta mutually excusive

* add krb5 provider

* add krb conn str examples

* update krb con str example

* update krb params info

Co-authored-by: chandan jain <[email protected]>
Co-authored-by: shwetamoharil <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants