I’ve been referred to both:
?URLencode
#and
?curlEscape
I see that both functions work great for English, but fail to provide with the proper translation for Hebrew characters.
For example, the word
שלום
(Peace, in Hebrew)
Should be this:
%D7%A9%D7%9C%D7%95%D7%9D
But instead, both commands translate it to:
URLencode("שלום")
%f9%ec%e5%ed
What do you suggest? (write it myself, or is there something pre-made)
Thanks,
Tal
Update: My sessionInfo:
> sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255
[3] LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C
[5] LC_TIME=Hebrew_Israel.1255
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Both URLencode and charToRaw seem to work for me…
Looking at the source code of URLencode
Which version of R are you using?
Here is my sessionInfo()
sessionInfo()
R version 2.10.0 (2009-10-26)
i386-pc-mingw32
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] preprocessCore_1.8.0
loaded via a namespace (and not attached):
[1] tools_2.10.0