FGRibreau / FGRibreau/node-unidecode
Multi-pass required to correctly unidecode
- 主要言語
- JavaScript
- スター
- 151
- フォーク
- 24
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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).
コントリビューションガイド
調査の方向性
まず、提供されている `unidecode(s)` の再現を実行し、`require('unidecode')` が使用するパッケージエントリポイントを追跡します。隣接するバイト列がどのように処理されるかを確認し、報告された文字列の回帰テストカバレッジを追加します。1 回の呼び出しで期待される ASCII 出力が生成されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100