From 8a8c06136c9254b029368c24dc34915f49af6d0c Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Fri, 4 May 2018 16:22:21 -0700 Subject: [PATCH] Explicit enc2native() --- src/XlsWorkBook.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/XlsWorkBook.h b/src/XlsWorkBook.h index 8086725a..ba23aed1 100644 --- a/src/XlsWorkBook.h +++ b/src/XlsWorkBook.h @@ -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(normalizePath(path, "/", true)); + Rcpp::Function enc2native = baseEnv["enc2native"]; + return Rcpp::as(enc2native(normalizePath(path, "/", true))); } class XlsWorkBook { @@ -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) {