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(
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
>
>
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
>
> 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 exp
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:
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 ü
While preparing a function that contained non-ASCII characters for inclusion
into a package, I replaced all non-ASCII characters with UTF-8 escape
sequences (using \u) in order to make the package portable (and adhere to
"R CMD check"). What I didn't expect: when one uses UTF-8 escape sequen