Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot open file with unicode characters correctly #22

Open
dracodoc opened this issue Oct 27, 2016 · 0 comments
Open

cannot open file with unicode characters correctly #22

dracodoc opened this issue Oct 27, 2016 · 0 comments

Comments

@dracodoc
Copy link

dracodoc commented Oct 27, 2016

  1. For file with only English characters but encoded in GB2312 or UTF-8 without signature, it can be opened correctly.
  2. For file encoded with UTF-8 with signature, there is some messed up code in file beginning:

锘<bf>--- title: "Untitled"

  1. For file with Unicode characters and encoded in UTF-8 (I didn't see any special characters visually, but converting the file to non-Unicode encoding will have the warning of loss of characters), editR will open an empty window.
  2. If I convert the above file to GB2312 (there is no Chinese characters inside it) and proceed with the warning of loss of some Unicode characters, it can be opened by editR correctly.

There is always this warning in console, no matter if the file was read correctly:

Warning in readChar(md_name, file.info(md_name)$size) : can only read in bytes in a non-UTF-8 MBCS locale

My sessioninfo:

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936    LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C                               LC_TIME=Chinese (Simplified)_China.936    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant