Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char = "LÍNEA"
- char2 = "LÍNEA"
- char == char2
- [1] TRUE
- sub_utf8 <- function(char) {
- while(TRUE) {
- utf <- str_match(char, '\&\#([0-9]+)\;')[,2]
- if (is.na(utf)) break()
- char <- str_replace(char, '\&\#([0-9]+)\;', intToUtf8(utf))
- }
- return(char)
- }
- char = "LÍNEA"
- char2 = "LÍNEA"
- sub_utf8(char) == char2
- [1] TRUE
- char3 = "LÍNEdA"
- sub_utf8(char3)
- [1] "LÍNEdA"
Add Comment
Please, Sign In to add comment