-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Special character issue on windows #10
Comments
I just added a call to |
library(magrittr)
library(msgxtractr)
system.file("extdata/unicode.msg", package="msgxtractr") %>%
file.copy(to = c("Copenhagen.msg", "København.msg"), overwrite = TRUE)
#> [1] TRUE TRUE
(mails <- list.files(pattern = "msg"))
#> [1] "Copenhagen.msg" "København.msg"
(mails2 <- normalizePath(path.expand(mails)))
#> [1] "M:\\msgxtractr\\test\\Copenhagen.msg"
#> [2] "M:\\msgxtractr\\test\\København.msg"
lapply(mails2, read_msg)
#> [[1]]
#> Mon, 18 Nov 2013 10:26:24 +0200
#> From: Brian Zhou <[email protected]>
#> To: [email protected]
#> Subject: Test for TIF files
#> Attachments: 2
#>
#> [[2]]
#> From: [Unspecified]
#> To: [Unspecified]
#> Subject: [Unspecified] Created on 2018-10-15 by the reprex package (v0.2.1) |
Thx for testing. I’ll get the VM fired up tomorrow and shld be able to
track this down pretty quickly.
…On Mon, Oct 15, 2018 at 08:21 BirgerNi ***@***.***> wrote:
normalizePath() does not seem to help. Please let me know if I can
provide further information.
library(magrittr)
library(msgxtractr)
system.file("extdata/unicode.msg", package="msgxtractr") %>%
file.copy(to = c("Copenhagen.msg", "København.msg"), overwrite = TRUE)#> [1] TRUE TRUE
(mails <- list.files(pattern = "msg"))#> [1] "Copenhagen.msg" "København.msg"
(mails2 <- normalizePath(path.expand(mails)))#> [1] "M:\\msgxtractr\\test\\Copenhagen.msg"#> [2] "M:\\msgxtractr\\test\\København.msg"
lapply(mails2, read_msg)#> [[1]]#> Mon, 18 Nov 2013 10:26:24 +0200#> From: Brian Zhou ***@***.***>#> To: ***@***.***#> Subject: Test for TIF files#> Attachments: 2#> #> [[2]]#> From: [Unspecified]#> To: [Unspecified]#> Subject: [Unspecified]
Created on 2018-10-15 by the reprex package <https://reprex.tidyverse.org>
(v0.2.1)
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAfHtkhF3uhxJVB4neLgAPcNPi6OWf_4ks5ulH3egaJpZM4Xbraq>
.
|
Try doing:
before the calls to then
afterwards. |
I guess your suggestion goes in the right direction, this seems to be an encoding issue.
Unfortunately, I cannot set encoding to UTF-8. According to this topic at so windows still don't support UTF-8. |
read_msg
does not work for me on windows when there are special characters in thepath
. The same code works like expected on linux.Have a look at the example below. In the path of the second mail there are special characters.
On Windows:
On Linux:
The text was updated successfully, but these errors were encountered: