Coder Social home page Coder Social logo

Comments (8)

thomasgalliker avatar thomasgalliker commented on June 8, 2024

This library works with replacement mappings: Diacritics character í is mapped to i, character Í is mapped to I, and so on. There is no general mechanism that maps between diacritics and non-diactritics characters. Can you report all characters (and their normalized equivalents) please?

from diacritics.net.

anth12 avatar anth12 commented on June 8, 2024

For Turkish there are 4 I's:

The lowercase version of İ is i
The lowercase version of I is ı

The mappings to "remove diacritics" would be:
İ -> I
ı -> i

However with the current code, simply adding the mapping wouldn't solve due to the lower case conversion as İ would be converted to i & therefore not replaced.

from diacritics.net.

thomasgalliker avatar thomasgalliker commented on June 8, 2024

Hmm, I'm lost somehow. So, if I add these two mappings, it would not be enough to solve the problem?
İ -> I
ı -> i

from diacritics.net.

anth12 avatar anth12 commented on June 8, 2024

There are mappings for the characters, but the issue lies in DiacriticsMapper#56.

Say I invoke DiacriticsMapper.RemoveDiacritics("İngiltere"), at L56 input = "İngiltere" & source = "ingiltere" which leads to the original input being returned as the while checks the lowercase source for instances of any diacritic character.

from diacritics.net.

thomasgalliker avatar thomasgalliker commented on June 8, 2024

Ups, I somehow forgot to come back to this issue. Do you have a proposal on how to solve it? Is it because line 56 does only compare index positions ignoring case sensitivity?

from diacritics.net.

thomasgalliker avatar thomasgalliker commented on June 8, 2024

@anth12 can you please check this nuget pre-release:
https://www.nuget.org/packages/Diacritics/2.1.19240.1-pre

from diacritics.net.

thomasgalliker avatar thomasgalliker commented on June 8, 2024

@anth12 did you have a chance to install and test the latest nuget pre-release? I want to make sure your issue is solved before I close it.

from diacritics.net.

thomasgalliker avatar thomasgalliker commented on June 8, 2024

Seems like you have your own diacritics library now 🤩 I guess I can close this issue then.

from diacritics.net.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.