Bug 16524 - parser column numbers incorrect with unicode characters
Summary: parser column numbers incorrect with unicode characters
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Misc (show other bugs)
Version: R 3.2.1
Hardware: Other Other
: P5 enhancement
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2015-08-28 14:29 UTC by Simon Byrne
Modified: 2016-07-03 22:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Byrne 2015-08-28 14:29:07 UTC
When using UTF-8 strings, the column numbers reported by parse (and in the corresponding srcfile) are incorrect. For example:

> txt = "αααα <- $x"
> parse(text=txt)
Error in parse(text = txt) : <text>:1:5: unexpected '$'
1: αααα <- $
        ^
whereas with ASCII:

> txt = "aaaa <- $x"
> parse(text=txt)
Error in parse(text = txt) : <text>:1:9: unexpected '$'
1: aaaa <- $
            ^
Comment 1 Randy Lai 2016-07-03 20:26:15 UTC
I believe that it is related to this commit

https://github.com/wch/r-source/commit/fc9ece557d0e32f8f78966bdec72b9c892a9b08b