Regular expression operations in R, such as grep or gsub, sometimes have significant performance overheads due to encoding conversions. Some R code tries to mitigate this by ignoring input encodings and pretending it is fine to work on individual bytes (via useBytes=TRUE). This removes such overheads, but produces correct results only in special cases, e.g. for simple regular expressions in UTF-8.