Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Need to mark the string returned as UTF-8 #278
Hi @eddelbuettel , first of all, thanks for making this great package.
Occasionally, we need to return non-English characters from Bloomberg (as the example below). However, because the current version doesn't mark the encoding as UTF8 explicitly, it causes trouble on a Windows machine, where the native encoding varies.
This PR will fix this. I have manually compiled the PR version and tested it on the Bloomberg computer in the office and find no problems by far.
If there's more need to be done, please let me know.
library(Rblpapi) blpConnect() out <- bdp(securities = c("BBG006YQMFQ5", "BBG005CMJQ71"), fields = c("NAME_CHINESE_SIMPLIFIED", "ISSUE_DT"), overrides = c("SECURITY_NAME_LANG" = "10")) Encoding(out$NAME_CHINESE_SIMPLIFIED) # before this PR, it says "unknown" and it causes trouble, because we have # to change the encoding by hand like `Encoding(out$NAME_CHINESE_SIMPLIFIED) <- "UTF-8"` # in order to display the strings correctly. out$ISSUE_DT out$NAME_CHINESE_SIMPLIFIED
It's weird... If I compiled the package from the master branch (w/o this PR) on my computer, it still returns "1970-01-01" but the CRAN version returns the correct value "NA".
I have no clue at all.
So I think it's unrelated to this PR and the PR itself should be safe...
I believe the "Date Issue" is caused by the PR #273
The default value created by