Skip to content

Commit

Permalink
Explicit enc2native()
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed May 4, 2018
1 parent 945178d commit 8a8c061
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/XlsWorkBook.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
inline std::string normalizePath(std::string path) {
Rcpp::Environment baseEnv = Rcpp::Environment::base_env();
Rcpp::Function normalizePath = baseEnv["normalizePath"];
return Rcpp::as<std::string>(normalizePath(path, "/", true));
Rcpp::Function enc2native = baseEnv["enc2native"];
return Rcpp::as<std::string>(enc2native(normalizePath(path, "/", true)));
}

class XlsWorkBook {
Expand All @@ -26,8 +27,7 @@ class XlsWorkBook {
public:

XlsWorkBook(const std::string& path) {
//path_ = normalizePath(path);
path_ = path;
path_ = normalizePath(path);

xls::xlsWorkBook* pWB_ = xls::xls_open(path_.c_str(), "UTF-8");
if (pWB_ == NULL) {
Expand Down

0 comments on commit 8a8c061

Please sign in to comment.