UTF8 [🇷 for BE/BA]
❝ txt21<-"esto es español\n"
❝ cat(txt21)
❝ esto es espanol
❝ Ps. The display of Spanish looks like not exactly same as input text.
On my system (Win7 64bit, German locale, R 3.2.2, font in
/etc/Rconsole
: Lucida Console) it’s fine:cat(txt21)
esto es español
As a last resort one can always fall back to Unicode (see his old document). Try:
utf8 <- "esto es espa\u00f1ol\n"
cat(utf8)
esto es español
Whether or not a character can be displayed depends on the locale, the chosen font (and even on its version). Try:
start <- 33
end <- 62276
dec.code <- start:end
hex.code <- sprintf("\\u%s", format(as.hexmode(dec.code), width=4))
m <- gregexpr("\\\\u[0-9A-Fa-f]{4}", hex.code)
regmatches(hex.code, m) <- lapply(
lapply(regmatches(hex.code, m), substr, 3, 7), function(x)
intToUtf8(as.integer(as.hexmode(x)), multiple=TRUE))
noquote(hex.code[1:2000])
Combining characters should be avoided if ever possible since they are available only in more recent versions of fonts. Try:
med.symbol <- "x\u0303\n"
cat(med.symbol)
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
Helmut Schütz
![[image]](https://static.bebac.at/img/CC by.png)
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Complete thread:
- release of bear v2.6.6 yjlee168 2015-08-26 23:13
- release of bear v2.6.6 BE-proff 2015-08-31 09:40
- R is a really great and free software environment yjlee168 2015-08-31 12:32
- bear to support different languages? yjlee168 2015-09-08 11:38
- UTF8Helmut 2015-09-08 15:02
- UTF8 yjlee168 2015-09-08 18:48
- compiled errors yjlee168 2015-09-08 19:51
- UTF8Helmut 2015-09-08 15:02
- release of bear v2.6.6 BE-proff 2015-08-31 09:40