nealrichardson commented on a change in pull request #7527:
URL: https://github.com/apache/arrow/pull/7527#discussion_r445098056



##########
File path: r/R/schema.R
##########
@@ -83,16 +83,21 @@ Schema <- R6Class("Schema",
     }
   ),
   active = list(
-    names = function() Schema__field_names(self),
+    names = function() {
+      out <- Schema__field_names(self)
+      # Hack: Rcpp should set the encoding

Review comment:
       This is a more general problem, would affect the `names()` method of any 
objects where they return a `std::vector<std::string>`. Those must (as I 
understand it) always be UTF-8 in Arrow, but if you don't declare them as UTF-8 
in R, then they get displayed all mangled on Windows (default/unknown encoding 
treated as `latin1`). 
   
   Rather than relying on the default `Rcpp::wrap` method for this, we should 
probably wrap ourselves. I could naively write this (create CharacterVector, 
iterate over the `std::vector<std::string>` and insert Rcpp::String with 
CE_UTF8) but maybe that's not great?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to