Comments (3)
I think we should clearly be returning false
here, similar to malformed characters.
Malformed chars can never get passed to utf8proc in the first place — if there is no way to convert them to a UInt32
codepoint, you can't pass them to the utf8proc API.
On invalid codepoints, utf8proc_isupper(codepoint)
should return false.
from julia.
Isn't this a bug in ismalformed
? If it can't be converted to a codepoint, isn't it malformed?
Or should we have another predicate in this case, where it's failing because it is an overlong encoding (Base.is_overlong_enc
is returning true
in UInt32(c)
)?
from julia.
Maybe
Lines 414 to 415 in dbf0bab
should just be calling isvalid(c)
instead of ismalformed(c)
?
Or better yet just (ismalformed(c) | isoverlong(c))
since utf8proc checks for the other cases.
Or better yet, shouldn't we have a predicate
hascodepoint(c::AbstractChar) = !(ismalformed(c) | isoverlong(c))
to check whether one can call codepoint(c)
(== UInt32(c)
)?
from julia.
Related Issues (20)
- Autocompletion triggers error in invalid `AbstractDict`
- Foo{T >: Int} gives ERROR: UndefVarError: `T` not defined HOT 7
- Double counting test broken on i686-linux
- JET linting error from `wrap` on `Array` (on 1.11) HOT 3
- Add `strict` mechanism for opting into stricter subsets of the language HOT 16
- `UnionAll`s with trivial bodies ignore type lower bounds? HOT 2
- RFC: Export versioning HOT 3
- auto-completion doesn't work correctly in pkg mode HOT 7
- verify_ir desn't catch SSAValue from outside range HOT 1
- Allow type variables with `do` syntax HOT 18
- Type instabilities with `mapslices` and `PermutedDimsArray` functions HOT 1
- maximum(abs, ::Array{Complex{Int}}; dims=...) fails with an internal error HOT 4
- Concatenation of string constants isn't concretely evaluated, but is inferred as a `Const` HOT 4
- Test failure in `Sockets` with `IOError: listen: address already in use (EADDRINUSE)`
- Overrides.toml broken on master HOT 6
- `GlobalRef`s as `Dict` keys in precompilation are invalid HOT 1
- `Array{T}(::T)` should return a zero-dimensional array HOT 7
- GC is too lazy, sometimes HOT 11
- External Pkg always recompiles upon loading HOT 12
- REPLExt for Pkg no longer loads when loading a custom Pkg HOT 2
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 julia.