Comments (9)
This will need C code to distinguish between "unknown" encoding and truly "all ASCII", basically an enhanced do_encoding() that also checks IS_ASCII(). Eventually this could be added upstream.
from enc.
What's the difference between unknown and ascii? I thought unknown implied ascii.
from enc.
Need to double-check.
from enc.
There' a dedicated ASCII bit that is set if the code of all characters is 127 or less.
from enc.
But that never gets used in Encoding()
: https://github.com/wch/r-source/blob/2f2e4711ad7089f97f22c6b1ae25ba582d2e99a6/src/main/util.c#L1110
from enc.
Also, none of the internal string representation stuff is in the exported API, so I think that means doing checks in R with Encoding()
will be the easiest way forward.
from enc.
ASCII implies unknown, but not the other way round. It will be difficult to detect pure ASCII strings using Encoding() only.
from enc.
Yes, but it'll be accurate >95% of the time, I'd imagine
from enc.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
from enc.
Related Issues (20)
- Faster version of enc2latin1() and enc2alien()
- Sort keys HOT 2
- Class that hosts a list of names HOT 3
- Get rid of utf8 class HOT 2
- Exception handling HOT 1
- Rename to enc HOT 8
- C implementation
- Umlaute deleted HOT 4
- Add missing version tag HOT 2
- Consider using `LEVELS` instead of accessing sxpinfo directly HOT 2
- Clarifying life cycle HOT 1
- Export detect_sep()
- Integrate vctrs
- Release enc 0.2.1 HOT 1
- Utf-8 class also needs to re-encode names HOT 1
- Consider as.utf8 method for lists? HOT 1
- README needs to give more advice HOT 3
- Remove Encoding<-() override HOT 1
- read_lines() and write_lines() HOT 3
- Support for UTF-8 encoded language symbols HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enc.