irb(main):079:0> File.write("file.txt", "vandflyver xC5rhus")
=> 16
irb(main):080:0> open("file.txt", "r") { |io| io.read.encode("UTF-8", invalid: :replace) }
=> "vandflyver �rhus"
irb(main):081:0> open("file.txt", "r") { |io| io.read.encode("UTF-8", invalid: :replace, replace: "") }
=> "vandflyver rhus"
Code Example |
---|
Ruby :: ruby name parameters |
Ruby :: ruby function arguments |
Ruby :: add index in rails |
Ruby :: rails |
Ruby :: List columns in table from console |
Ruby :: how to add variable inside string ruby |
Ruby :: rails start id to 1000 |
Ruby :: chop! ruby |
Ruby :: ruby rspec change matcher |
Ruby :: run a specific delayed job from console |
Ruby :: rspec match optional keyword arguments |
Ruby :: add two numbers ruby |
Ruby :: rails order nil last |
Ruby :: ruby puts object |
Ruby :: rails migration error |
Ruby :: is codegrepper rafe approved? |
Ruby :: rails rspec test email sent |
Ruby :: rails loop |
R :: linetype ggplot in r |
R :: r convert string to list of characters |
R :: composite score in r |
R :: create file in r |
R :: Write data from R to clipboard |
R :: round multiple columns in r |
R :: show 2 plots together |
R :: percent of missing data in df r |
R :: comment faire un boucle sur r |
R :: n list to dataframe r |
R :: read.table tab separator |
R :: r select columns by vector of names |