If you print:
"\xc9\x82\xbf"
you get
"\u0242\xbf"
But if you try and evaluate that string you get:
> "\u0242\xbf"
Error: mixing Unicode and octal/hex escapes in a string is not allowed
(Probably will only happen on mac/linux with default utf-8 encoding)
Hadley
--
http://hadley.nz
__
On 07/07/2016 10:57 AM, Hadley Wickham wrote:
If you print:
"\xc9\x82\xbf"
you get
"\u0242\xbf"
But if you try and evaluate that string you get:
"\u0242\xbf"
Error: mixing Unicode and octal/hex escapes in a string is not allowed
(Probably will only happen on mac/linux with default utf-8
On Thu, Jul 7, 2016 at 10:11 AM, Duncan Murdoch
wrote:
> On 07/07/2016 10:57 AM, Hadley Wickham wrote:
>>
>> If you print:
>>
>> "\xc9\x82\xbf"
>>
>> you get
>>
>> "\u0242\xbf"
>>
>> But if you try and evaluate that string you get:
>>
>>> "\u0242\xbf"
>>
>> Error: mixing Unicode and octal/hex es
> On Jul 7, 2016, at 11:40 AM, Hadley Wickham wrote:
>
> On Thu, Jul 7, 2016 at 10:11 AM, Duncan Murdoch
> wrote:
>> On 07/07/2016 10:57 AM, Hadley Wickham wrote:
>>>
>>> If you print:
>>>
>>> "\xc9\x82\xbf"
>>>
>>> you get
>>>
>>> "\u0242\xbf"
>>>
>>> But if you try and evaluate that stri
>>> I'm not sure what should happen here, but that's not a legal string in a
>>> UTF-8 locale, so it's not too surprising that things go wonky.
>>
>> Here's bit more context on how I got that sequence of bytes:
>>
>> x <- "こんにちは"
>> y <- iconv(x, to = "Shift-JIS")
>> Encoding(y)
>> y
>>
>> I did th
> On 07 Jul 2016, at 18:15 , Hadley Wickham wrote:
>
> Right - I'm aware of that. But to me, it doesn't seem correct to
> print a string that is not a valid R string. Why is an unknown
> encoding printed like UTF-8?
>
It isn't -- no UTF-8 would have the \xbf. I may be flogging a dead horse, b
Is there any way to distinguish between an error and a user
interruption in R_tryEval? In both cases the ErrorOccurred argument is
set to 1. For my application I need a different action in case of a
SIGINT.
>From the source code I infer that R_tryEval basically wraps eval in
R_ToplevelExec, which
In R code tryCatch can detect the difference. Hit control-C (on Unixen) or
Escape
(on Windows) to interrupt the long-running for loop and see that the
interrupt clause
gets called:
> z <- tryCatch(for(i in seq_len(1e8))log(exp(i/10)), error=function(e)e,
interrupt=function(e)e)
^C> dput(z)
struct
On 07/07/2016 12:51 PM, peter dalgaard wrote:
> On 07 Jul 2016, at 18:15 , Hadley Wickham wrote:
>
> Right - I'm aware of that. But to me, it doesn't seem correct to
> print a string that is not a valid R string. Why is an unknown
> encoding printed like UTF-8?
>
It isn't -- no UTF-8 would hav
I am trying to build R under 64bit Windows7. I am using a fresh
install of Rtools34 and R-patched_2016-07-05. I am getting the
following error:
C:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o tcltk.dll tmp.def init.o
tcltk.o tcltk_win.o ../../../gnuwin32/dllversion.o -L../../../../Tcl/bin
On 07/07/2016 5:47 PM, Avraham Adler wrote:
I am trying to build R under 64bit Windows7. I am using a fresh
install of Rtools34 and R-patched_2016-07-05. I am getting the
following error:
C:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o tcltk.dll tmp.def init.o
tcltk.o tcltk_win.o ../../
11 matches
Mail list logo