| Line 601... |
Line 601... |
| 601 |
toRaw = asLogical(CAR(args));
|
601 |
toRaw = asLogical(CAR(args));
|
| 602 |
if(toRaw == NA_LOGICAL)
|
602 |
if(toRaw == NA_LOGICAL)
|
| 603 |
error(_("invalid '%s' argument"), "toRaw");
|
603 |
error(_("invalid '%s' argument"), "toRaw");
|
| 604 |
/* some iconv's allow "UTF8", but libiconv does not */
|
604 |
/* some iconv's allow "UTF8", but libiconv does not */
|
| 605 |
if(streql(from, "UTF8") || streql(from, "utf8") ) from = "UTF-8";
|
605 |
if(streql(from, "UTF8") || streql(from, "utf8") ) from = "UTF-8";
|
| 606 |
if(streql(to, "UTF8") || streql(from, "utf8") ) to = "UTF-8";
|
606 |
if(streql(to, "UTF8") || streql(to, "utf8") ) to = "UTF-8";
|
| 607 |
/* Should we do something about marked CHARSXPs in 'from = ""'? */
|
607 |
/* Should we do something about marked CHARSXPs in 'from = ""'? */
|
| 608 |
if(streql(to, "UTF-8")) isUTF8 = TRUE;
|
608 |
if(streql(to, "UTF-8")) isUTF8 = TRUE;
|
| 609 |
if(streql(to, "latin1") || streql(to, "ISO_8859-1")
|
609 |
if(streql(to, "latin1") || streql(to, "ISO_8859-1")
|
| 610 |
|| streql(to, "CP1252")) isLatin1 = TRUE;
|
610 |
|| streql(to, "CP1252")) isLatin1 = TRUE;
|
| 611 |
if(streql(to, "") && known_to_be_latin1) isLatin1 = TRUE;
|
611 |
if(streql(to, "") && known_to_be_latin1) isLatin1 = TRUE;
|