Github user sun-rui commented on a diff in the pull request:
https://github.com/apache/spark/pull/7494#discussion_r38058562
--- Diff: R/pkg/inst/tests/test_sparkSQL.R ---
@@ -417,6 +417,32 @@ test_that("collect() and take() on a DataFrame return
the same number of rows an
expect_equal(ncol(collect(df)), ncol(take(df, 10)))
})
+test_that("collect() support Unicode characters", {
+ markUtf8 <- function(s) {
+ Encoding(s) <- "UTF-8"
+ s
+ }
+
+ lines <- c("{\"name\":\"ìë
íì¸ì\"}",
+ "{\"name\":\"æ¨å¥½\", \"age\":30}",
+ "{\"name\":\"ããã«ã¡ã¯\", \"age\":19}",
+ "{\"name\":\"Xin chà o\"}")
+
--- End diff --
Still a little bit confused about the behavior of treating unicode string
in non-UTF8 local. Why no need to makeUtf8 for these unicode strings?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]