Skip to content

Problems with UTF-8 on Windows #482

Open
@huguesmp

Description

@huguesmp

Versions 0.6.7 and 0.6.8+ introduced problems for me on Windows. Since it is on my work machine, I cannot post screenshots unfortunately.

When I run for example devtools::check() on 0.6.7, I get many lines like this:

Warning in Sys.setlocale("LC_CTYPE", ctype) :
  using locale code page other than 1252 may cause problems

But the operation succeeds.

With radian 0.6.8 and above (I tested every version up to 0.6.12), I get many lines like these (the number is not always 2, it varies):

Warning in grep("^[^\\s]+:$", lines, perl = TRUE, value = TRUE) :
  input string 2 is invalid UTF-8

Then the devtools::check() command fails. It looks like it is unable to parse some files in my package, even though they are all in UTF-8. Other commands like use_version() also fail.

I see from the changelog that some changes to UTF-8 handling were made in these two versions.

image

My machine is Windows 10 pro and the LC_CTYPE=French_Canada.1252

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions