[R] Strings from different locale

sunny sunayan at gmail.com
Thu May 26 10:50:16 CEST 2011


Phil Spector wrote:
> 
> Steven -
>     Does typing
> 
> Sys.setlocale('LC_ALL','C')
> 
> before the offending command suppress the message?
> 
>  					- Phil Spector
>  					 Statistical Computing Facility
>  					 Department of Statistics
>  					 UC Berkeley
>  					 spector at stat.berkeley.edu
> 
> 
> On Mon, 1 Nov 2010, steven mosher wrote:
> 
>> I'm doing some test processing of a cvs file that appears to use a
>> different
>> locale
>> from my machine.
>>
>> I get the following warning:
>>
>> input string 1 is invalid in this locale
>>
>> My locale is US. Is this simply a matter of changing my locale to 'all;
>> locales?
>>
>> I don't know what locale the string is in, is there a way to detect this
>> or
>> translate
>>
> 
Thanks! I was having a similar problem with some non-English characters
(such as the e-acute) causing memory corruption ('glibc detected' error)
upon using grep. Your solution makes it work fine.

-Sunny.

--
View this message in context: http://r.789695.n4.nabble.com/Strings-from-different-locale-tp3023176p3551974.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list