FGRibreau / FGRibreau/node-unidecode
Multi-pass required to correctly unidecode
- Lingua principale
- JavaScript
- Stelle
- 151
- Fork
- 24
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
For some cases it needs several passes to completely convert to ascii. Take this example:
var unidecode = require('unidecode')
var s = 'RocÃo MartÃn-Valero'; // there is a hidden - appearing after both Ã's if you paste in console!
console.log(unidecode(s)) // prints RocÃo MartÃn-Valero (removes that hidden -), but still not ascii
console.log(unidecode(unidecode(s))) // 2 passes to print RocAo MartAn-Valero
Here is the hexdump of the above string:
00000000 52 6f 63 c3 83 c2 ad 6f 20 4d 61 72 74 c3 83 c2 |Roc....o Mart...|
00000010 ad 6e 2d 56 61 6c 65 72 6f 0a |.n-Valero.|
0000001a
So it seems it can't convert the 2 sequences `c3 83` and `c2 ad` that are back to back.
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41747210-multi-pass-required-to-correctly-unidecode?utm_campaign=plugin&utm_content=tracker%2F294213&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F294213&utm_medium=issues&utm_source=github).
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia eseguendo la riproduzione fornita di `unidecode(s)` e seguendo il punto di ingresso del pacchetto utilizzato da `require('unidecode')`. Verifica come vengono gestite le sequenze di byte adiacenti e aggiungi una copertura di regressione per la stringa segnalata; il lavoro è completato quando una chiamata produce l’output ASCII previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, node.js
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100