Skip to content

Code panics for Unicode U+10000 #8

@tja

Description

@tja

Decoding a string with a unicode rune of U+10000 — 𐀀 — results in a panic. The reason is line 45 in unidecode.go, which allows the aforementioned unicode character to slip through..

if c > unicode.MaxRune || c > transCount {

..causing an "index out of range" error in line 49. Changing this to..

if c > unicode.MaxRune || c >= transCount {

..fixes the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions