Re: [Rd] use of UTF-8 \uxxxx escape sequences in function arguments

2012-01-20 Thread Thomas Zumbrunn
On Friday 20 January 2012, Simon Urbanek wrote: On Jan 19, 2012, at 6:39 PM, Thomas Zumbrunn wrote: On Thursday 19 January 2012, peter dalgaard wrote: On Jan 18, 2012, at 23:54 , Thomas Zumbrunn wrote: plain(Zürich) ## works plain(Z\u00BCrich) ## fails escaped(Zürich) ## fails

Re: [Rd] use of UTF-8 \uxxxx escape sequences in function arguments

2012-01-19 Thread Thomas Zumbrunn
On Thursday 19 January 2012, peter dalgaard wrote: On Jan 18, 2012, at 23:54 , Thomas Zumbrunn wrote: plain(Zürich) ## works plain(Z\u00BCrich) ## fails escaped(Zürich) ## fails escaped(Z\u00BCrich) ## works Using the correct UTF-8 code helps quite a bit: U+00BC¼

Re: [Rd] use of UTF-8 \uxxxx escape sequences in function arguments

2012-01-19 Thread Jeroen Ooms
I installed libiconv from http://www.gnu.org/software/libiconv/, and now I can easily replace all non- ASCII characters in my UTF-8 encoded R files with: iconv -f UTF-8 -t ASCII --unicode-subst=\u%04X my-utf-8-encoded-file.R Maybe it would be possible to create an R package that exposes an

Re: [Rd] use of UTF-8 \uxxxx escape sequences in function arguments

2012-01-19 Thread Simon Urbanek
On Jan 19, 2012, at 6:39 PM, Thomas Zumbrunn wrote: On Thursday 19 January 2012, peter dalgaard wrote: On Jan 18, 2012, at 23:54 , Thomas Zumbrunn wrote: plain(Zürich) ## works plain(Z\u00BCrich) ## fails escaped(Zürich) ## fails escaped(Z\u00BCrich) ## works Using the correct

Re: [Rd] use of UTF-8 \uxxxx escape sequences in function arguments

2012-01-19 Thread Simon Urbanek
On Jan 19, 2012, at 7:27 PM, Jeroen Ooms wrote: I installed libiconv from http://www.gnu.org/software/libiconv/, and now I can easily replace all non- ASCII characters in my UTF-8 encoded R files with: iconv -f UTF-8 -t ASCII --unicode-subst=\u%04X my-utf-8-encoded-file.R Maybe it

Re: [Rd] use of UTF-8 \uxxxx escape sequences in function arguments

2012-01-18 Thread peter dalgaard
On Jan 18, 2012, at 23:54 , Thomas Zumbrunn wrote: plain(Zürich) ## works plain(Z\u00BCrich) ## fails escaped(Zürich) ## fails escaped(Z\u00BCrich) ## works Using the correct UTF-8 code helps quite a bit: U+00BC ¼ c2 bc VULGAR FRACTION ONE QUARTER U+00FC ü c3 bc