Skip to content

Non-ascii in AsIs paths #618

@jonthegeek

Description

@jonthegeek

chr_to_file() (called from standardise_path(), which is called from several places) fails for non-ascii text:

vroom:::chr_to_file("text\nEl Ni\xf1o was particularly bad this year")
#> Warning in sub("\n$", "", x): unable to translate 'text
#> El Ni<f1>o was particularly bad this year' to a wide string
#> Error in `sub()`:
#> ! input string 1 is invalid

Created on 2026-04-17 with reprex v2.1.1

It looks like the sub() just needs a useBytes = TRUE.

This is related to tidyverse/readr#1521

I'll submit a PR shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions