You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, boxr checks for non-ASCII filenames in the function box_filename() implemented in boxr__internal_misc.R, and raises an error if any non-ASCII characters are present. However, the BOX API does not have any such restrictions.
Thus, if lines 7-12 of boxr__internal_misc.R are deleted, the package will work for non-English environments as well. I have tested this locally and was able to upload a file named テストファイル.txt without problems.
diff --git i/R/boxr__internal_misc.R w/R/boxr__internal_misc.R
index 9e50756..2deb343 100644
--- i/R/boxr__internal_misc.R
+++ w/R/boxr__internal_misc.R
@@ -4,12 +4,6 @@
# supported are those that contain non-printable ascii, / or \, names with
# trailing spaces, and the special names "." and "..".
box_filename <- function(x) {
- x <- iconv(x, from = "", to = "ascii")
-
- if (is.na(x))
- stop("box.com accepts only valid ASCII filenames. Filename conversion to",
- " ASCII via iconv() failed. See ?Encoding")
-
if (nchar(x) > 255)
stop("box.com accepts only filenames of 255 characters or less. Filename ",
"is ", nchar(x), " characters long.")
The text was updated successfully, but these errors were encountered:
toreeriksson
changed the title
Unneccessary check for non-ASCII filnames should be removed.
Unneccessary check for non-ASCII filenames should be removed
Aug 1, 2024
Currently,
boxr
checks for non-ASCII filenames in the functionbox_filename()
implemented inboxr__internal_misc.R
, and raises an error if any non-ASCII characters are present. However, the BOX API does not have any such restrictions.Thus, if lines 7-12 of
boxr__internal_misc.R
are deleted, the package will work for non-English environments as well. I have tested this locally and was able to upload a file namedテストファイル.txt
without problems.The text was updated successfully, but these errors were encountered: