ramonovelar
2012-Jul-30 23:11 UTC
[R] Accents and special character using hwriter (on Windows)
Hello, I have a problem with special characters such as "?" or "?" when using hwriter. This only happens when I use windows, it works fine on mac. If I do: print(datosdv) "Ciencias Sociales y Jur?dicas n:74 | 33.94%" but: hwrite(datosdv, p, br=TRUE) "Ciencias Sociales y Jur?dicas n:74 | 33.94%" The bad sign is in the code, is not a problem of the encoding of the html page, that is in UTF-8. Does anybody have found this? Many thanks in advance. Ram?n -- View this message in context: http://r.789695.n4.nabble.com/Accents-and-special-character-using-hwriter-on-Windows-tp4638474.html Sent from the R help mailing list archive at Nabble.com.
Hello,
I tried your code in R 2.15 with Ubuntu 12.04.? It looks okay to me.
datosdv<-"Ciencias Sociales y Jur?dicas n:74 | 33.94%"
?print(datosdv)
#[1] "Ciencias Sociales y Jur?dicas n:74 | 33.94%"
?library(hwriter)
?p=openPage('test.html')
?hwrite(datosdv,p,br=TRUE)
#test.html output
Ciencias Sociales y Jur?dicas n:74 | 33.94%
Probably, it must be specific with the windows.? Are you using windows7?
A.K.
----- Original Message -----
From: ramonovelar <ramon.ovelar at gmail.com>
To: r-help at r-project.org
Cc:
Sent: Monday, July 30, 2012 7:11 PM
Subject: [R] Accents and special character using hwriter (on Windows)
Hello,
I have a problem with special characters such as "?" or "?"
when using
hwriter. This only happens when I use windows, it works fine on mac. If I
do:
print(datosdv)
"Ciencias Sociales y Jur?dicas n:74 | 33.94%"
but:
hwrite(datosdv, p, br=TRUE)
"Ciencias Sociales y Jur?dicas n:74 | 33.94%"
The bad sign is in the code, is not a problem of the encoding of the html
page, that is in UTF-8.
Does anybody have found this? Many thanks in advance.
Ram?n
--
View this message in context:
http://r.789695.n4.nabble.com/Accents-and-special-character-using-hwriter-on-Windows-tp4638474.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.