-
Notifications
You must be signed in to change notification settings - Fork 107
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
Feature/independent column name encoding #845
Feature/independent column name encoding #845
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stellar.💫
@@ -48,6 +48,10 @@ setMethod("show", "OdbcDriver", | |||
#' not using UTF-8 you will need to set the encoding to get accurate | |||
#' re-encoding. See [iconvlist()] for a complete list of available encodings | |||
#' on your system. Note strings are always returned `UTF-8` encoded. | |||
#' @param columnNameEncoding The text encoding for column names used on the | |||
#' Database. May be different than the `encoding` argument. Defaults to | |||
#' empty string which is equivalent to returning the column names without |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm slightly surprised that this doesn't default to encoding
. Are the column names and values encoded differently that often?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Hadley:
The issue that precipitated this PR is an instance where the content is encoded latin1
but the names are UTF-8
. Prior to 1.5.0 the names were never de/coded regardless how how the encoding
argument was specified, so in a sense we are just reverting to prior behavior, while retaining the flexibility that @shrektan added in 1.5.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that makes sense.
I think this is good to merge? |
Thumbs up from me! |
This closes #834.
Some history:
encoding
argument todbConnect
.latin1
/8-bit ascii, for example, but the DB driver returns the column names usingUTF-8
.To handle this, in this PR:
dbConnect
. New argument iscolumnNameEncoding
.To do before merging: