Giter Site home page Giter Site logo

Umlaute deleted about enc HOT 4 CLOSED

krlmlr avatar krlmlr commented on August 18, 2024
Umlaute deleted

from enc.

Comments (4)

NGaffney avatar NGaffney commented on August 18, 2024

The same thing occurs on my machine.

tempfile <- tempfile()         
text <- "glück"                
library(enc)                   
write_lines_enc(text, tempfile)
read_lines_enc(tempfile)       
#> [1] ""
Session info
devtools::session_info()
#> Session info -------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.5.0 (2018-04-23)
#>  system   x86_64, mingw32             
#>  ui       RTerm                       
#>  language (EN)                        
#>  collate  English_Australia.1252      
#>  tz       Australia/Sydney            
#>  date     2018-06-18
#> Packages -----------------------------------------------------------------
#>  package   * version date       source        
#>  backports   1.1.2   2017-12-13 CRAN (R 3.5.0)
#>  base      * 3.5.0   2018-04-23 local         
#>  compiler    3.5.0   2018-04-23 local         
#>  datasets  * 3.5.0   2018-04-23 local         
#>  devtools    1.13.5  2018-02-18 CRAN (R 3.5.0)
#>  digest      0.6.15  2018-01-28 CRAN (R 3.5.0)
#>  enc       * 0.2.0   2018-03-03 CRAN (R 3.5.0)
#>  evaluate    0.10.1  2017-06-24 CRAN (R 3.5.0)
#>  graphics  * 3.5.0   2018-04-23 local         
#>  grDevices * 3.5.0   2018-04-23 local         
#>  htmltools   0.3.6   2017-04-28 CRAN (R 3.5.0)
#>  knitr       1.20    2018-02-20 CRAN (R 3.5.0)
#>  magrittr    1.5     2014-11-22 CRAN (R 3.5.0)
#>  memoise     1.1.0   2017-04-21 CRAN (R 3.5.0)
#>  methods   * 3.5.0   2018-04-23 local         
#>  Rcpp        0.12.17 2018-05-18 CRAN (R 3.5.0)
#>  rmarkdown   1.9     2018-03-01 CRAN (R 3.5.0)
#>  rprojroot   1.3-2   2018-01-03 CRAN (R 3.5.0)
#>  stats     * 3.5.0   2018-04-23 local         
#>  stringi     1.2.2   2018-05-02 CRAN (R 3.5.0)
#>  stringr     1.3.1   2018-05-10 CRAN (R 3.5.0)
#>  tools       3.5.0   2018-04-23 local         
#>  utils     * 3.5.0   2018-04-23 local         
#>  withr       2.1.2   2018-03-15 CRAN (R 3.5.0)
#>  yaml        2.1.19  2018-05-01 CRAN (R 3.5.0)

from enc.

lorenzwalthert avatar lorenzwalthert commented on August 18, 2024

In the documentation of write_lines_enc() it says:

It [the function] always expects UTF-8.

I think the problem is that the string "glück" is encoded in the native encoding of the operating system you are using. On my mac, it is UTF-8, but I guess on Windows, the string is encoded differently. Will check tomorrow. So I think there is no issue, we just convert to utf encoding first using enc::to_utf8().

from enc.

yutannihilation avatar yutannihilation commented on August 18, 2024

So I think there is no issue, we just convert to utf encoding first using enc::to_utf8().

How about always applying enc::to_utf8() to text inside enc's functions?

from enc.

github-actions avatar github-actions commented on August 18, 2024

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

from enc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.