Skip to content

Commit

Permalink
fix grep unicode issue again
Browse files Browse the repository at this point in the history
  • Loading branch information
walke committed Oct 17, 2019
1 parent de64819 commit fededa9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/GENESISClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,9 @@ readRegDeath <- function(infile)
{
bb <- scan(infile, what=character(), blank.lines.skip = FALSE, encoding="ANSI", sep="\n")

h2 <- grep(";Insgesamt;m\\xe4nnlich",bb)
f1 <- grep("__________",bb)
h2 <- grep(";Insgesamt;m\\xe4nnlich",bb, useBytes = TRUE)
# 10 x low line \x5f
f1 <- grep("\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f",bb, useBytes = TRUE)
f2 <- length(bb)

header <- bb[1:h2]
Expand Down Expand Up @@ -454,8 +455,9 @@ readRegExp <- function(infile)
{
bb <- scan(infile, what=character(), blank.lines.skip = FALSE, encoding="ANSI", sep="\n")

h2 <- grep(";Insgesamt;m\\xe4nnlich",bb)
f1 <- grep("__________",bb)
h2 <- grep(";Insgesamt;m\\xe4nnlich",bb, useBytes = TRUE)
# 10 x low line \x5f
f1 <- grep("\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f\\x5f",bb, useBytes = TRUE)
f2 <- length(bb)

header <- bb[1:h2]
Expand Down

0 comments on commit fededa9

Please sign in to comment.