Displaying 3 results from an estimated 3 matches for "x_iutf8".
Did you mean:
iutf8
2017 Aug 01
3
special latin1 do not print as glyphs in current devel on windows
...(x)
Now with iconv() the result is as expected.
iconv(x, to = "UTF-8")
The second problem IMO is that encoding markers get lost with the enc2*
functions
x_utf8 <- enc2utf8(x)
Encoding(x_utf8)
x_nat <- enc2native(x_utf8)
Encoding(x_nat)
Again, this is not the case with iconv()
x_iutf8 <- iconv(x, to = "UTF-8")
Encoding(x_iutf8)
x_inat <- iconv(x_iutf8, from = "UTF-8")
Encoding(x_inat)
[[alternative HTML version deleted]]
2017 Aug 01
2
special latin1 do not print as glyphs in current devel on windows
...ASCII
internally, but this information doesn't seem to be available, e.g.,
Encoding() returns "unknown" for such strings "
http://r.789695.n4.nabble.com/source-parse-and-foreign-UTF-8-characters-tp4733523.html
>
> Again, this is not the case with iconv()
>>
>> x_iutf8 <- iconv(x, to = "UTF-8")
>> Encoding(x_iutf8)
>> x_inat <- iconv(x_iutf8, from = "UTF-8")
>> Encoding(x_inat)
>>
>
> iconv is converting from/to the current locale's encoding, presumably
> CP1252, not from the marked encoding (as the h...
2017 Aug 01
0
special latin1 do not print as glyphs in current devel on windows
...ot;UTF-8" "UTF-8"
> enc2native(x_utf8)
[1] "??" "<U+20AC>" "<U+2013>"
> Encoding(.Last.value)
[1] "latin1" "unknown" "unknown"
as expected.
> Again, this is not the case with iconv()
>
> x_iutf8 <- iconv(x, to = "UTF-8")
> Encoding(x_iutf8)
> x_inat <- iconv(x_iutf8, from = "UTF-8")
> Encoding(x_inat)
iconv is converting from/to the current locale's encoding, presumably
CP1252, not from the marked encoding (as the help page states explicitly.)
--...