Skip to content
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

Save ID csv files in UTF-8 encoding #16

Merged
merged 4 commits into from
Jul 14, 2023
Merged

Save ID csv files in UTF-8 encoding #16

merged 4 commits into from
Jul 14, 2023

Conversation

hsonne
Copy link
Member

@hsonne hsonne commented Jul 13, 2023

Save CSV files in UTF-8 encoding in order to fix the error reported by Birgitta


This change is Reviewable

with code like:

files <- dir("inst/extdata/IDs", full.names = TRUE)

for (file in files) {

  data <- read.table(
    file = file,
    sep = ";",
    as.is = TRUE,
    header = TRUE, fileEncoding = "WINDOWS-1252"
  )

  write.table(
    data,
    file,
    sep = ";",
    quote = FALSE,
    row.names = FALSE,
    col.names = TRUE,
    fileEncoding= "UTF-8"
  )
}
@hsonne hsonne requested a review from ma-z-am July 13, 2023 04:57
hsonne and others added 3 commits July 13, 2023 09:23
otherwise the results there will be differences
on different R versions. Use new helper function
read_csv_utf8(), also to reduce redundancy.
Install dependency "sf" beforehand, hopefully getting rid of
"ERROR: dependency 'sf' is not available for package 'r2q'"
Copy link
Collaborator

@ma-z-am ma-z-am left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 6 of 6 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @hsonne)

@ma-z-am ma-z-am merged commit a3c987d into main Jul 14, 2023
8 checks passed
@ma-z-am ma-z-am deleted the save-id-files-as-utf8 branch July 14, 2023 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants