dundalek / latinize

Simple library to convert accents (diacritics) from strings to latin characters.
BSD 2-Clause "Simplified" License
148 stars 33 forks source link

Character `𝖓` despite added to latinize not replaced. #18

Open Anatoly03 opened 3 years ago

Anatoly03 commented 3 years ago

Any ideas on what to do with Fraktur Bold characters?

Anatoly03 commented 3 years ago
export function lat(str) {
    let new_str = ''
    for (let x of str) {
        new_str += latinize.characters[x] || x
    }
    return new_str
}

Proposal of the new latinize function

mrjackyliang commented 2 years ago

Just use .normalize afterward. Works for me.