I may not be using the appropriate language in the title. If this needs edited please feel free.
I want to take a string with "byte"
substitutions for unicode characters and convert them back to unicode. Let's say I have:
x <- "bi<df>chen Z<fc>rcher hello world <c6>"
I'd like to get back:
"bi?chen Zürcher hello world ?"
I know that if I could get it to this form it would print to the console as desired:
"bixdfchen Zxfcrcher xc6"
I tried:
gsub("<([[a-z0-9]+)>", "\x\1", x)
## [1] "bixdfchen Zxfcrcher xc6"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…