Skip to content

Encoding problem on Windows with non-US English locale #54

@jennybc

Description

@jennybc

I have various reports of problems with listing Google Sheets or specifying worksheet names or (possibly) reading Sheet data from [1] Windows and [2] non-US English locales. Examples: Spanish_Spain.1252, Danish_Denmark.1252 and ... someone in Colombia who didn't provide session info.

I think all the problematic text has been successfully processed with httr::content(as = "text", encoding = "UTF-8") but then a problem is introduced in xml2::read_xml().

The most relevant issue is jennybc/googlesheets#151. I apologize for some noise there -- a recent example Sheet posted seems to have a different problem. If you look there, focus on the comments from @krose. He has done a lot of digging and posed a related question on stack overflow. From his work it seems the problem might come from

read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html)

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