genUnicodeString generates invalid unicode
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- testing-qa
Direzione di ricerca
Start with the generators in src/Data/Char/Gen.purs and src/Data/String/Gen.purs, then reproduce the failure using the linked utf8 encoding/decoding QuickCheck test. Determine how the generators should avoid unpaired surrogates while still covering valid Unicode. Done means generated strings are valid Unicode and the linked property test no longer fails.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The unicode character generator for unicode characters is picking a random CodePoint in the BMP. The unicode string generator just generates an arbitrary array of such code points and turns it into a string. It turns out that this can generate invalid unicode via unpaired surrogates: https://unicode.org/faq/utf_bom.html#utf16-7
One solution here would be to restrict the code points to avoid such cases, another would be to figure out a more complicated but correct way to generate unicode which cannot be done CodePoint by CodePoint.
For context I discovered this while trying to write a quickcheck test for utf8 encoding/decoding, you can see the failing test here
- Lingua principale
- PureScript
- Stelle
- 57
- Fork
- 76
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di purescript/purescript-strings
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
purescript/purescript-strings#176 · 6 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
purescript/purescript-strings#171 · 3 commenti · 1 reazione ·
-
Add takeEnd & dropEnd Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
purescript/purescript-strings#170 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
purescript/purescript-strings#169 · 7 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
purescript/purescript-strings#164 · 2 commenti ·
Tutte le issue di purescript/purescript-strings
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 91/100
nesquena/hermes-webui#7735 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
openml/openml-python#1749 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
melgarafael/DeskcommCRM#1445 ·
-
The correction-threshold rationale says 17 restraint cases collide; the current corpus has 16 Apertaarea:dictation documentation P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
uttrflow/uttrflow-swift#1180 ·