how do i remove diacritics from unicode characters https://www.phind.com/search?cache=bd2b33eb-9454-4d38-975e-1... and it answered with multiple Python code snippets with the second solution getting close to the real solution but is slow and incorrect.
Now if I ask the question I actually want
how do i remove diacritics from unicode characters with php https://www.phind.com/search?cache=c29fe466-16cc-4795-94bf-0... then you can see it misunderstanding the question: the first answer is the desirable output (I suspect it only works for latin letters tho) except for the iconv problems mentioned but the second is completely incorrect. The third answer is close but no cigar as it only works with Latin characters.
I'm not getting great results. It seems to love to latch on to a keyword in the question and run with it (maybe the GPT-4 version does better). I asked a question about async in Rust, it gave me a comparison between threads and async and then kept going in that direction instead of answering what I asked. I mentioned a specific crate as something I wanted an alternative to, and it told me a description of the crate. Rephrasing the question a few times eventually got a correct answer, but it's not much better than going straight to ChatGPT.
I've tried Phind a few times, but my gripe with it, so far, is it gives me outdated examples that don't work because the API has changed. Is there some magic keywords I should be including to prevent that?
It's far from perfect, but in my experience, it's much better than both ChatGPT and Bard. I've also used it to ask non-technical questions, and it often generates a good response, so not really just "for developers".
I asked
how do i remove diacritics from unicode characters https://www.phind.com/search?cache=bd2b33eb-9454-4d38-975e-1... and it answered with multiple Python code snippets with the second solution getting close to the real solution but is slow and incorrect.
Now if I ask the question I actually want
how do i remove diacritics from unicode characters with php https://www.phind.com/search?cache=c29fe466-16cc-4795-94bf-0... then you can see it misunderstanding the question: the first answer is the desirable output (I suspect it only works for latin letters tho) except for the iconv problems mentioned but the second is completely incorrect. The third answer is close but no cigar as it only works with Latin characters.
The answer I wanted to see is using the ICU library to run the rules NFD; [:Nonspacing Mark:] Remove; NFC. as mentioned on https://unicode-org.github.io/icu/userguide/transforms/gener... and https://www.unicode.org/iuc/iuc22/a339.html and a million other places but I wanted to link only official Unicode documentation.