Am encountering a problem when a string contains an apostrophe (single quote). Am developing a vocabulary learning app (French / English). The user must answer quizzes. The phone tells the user if what he/she types is the correct translation. Whenever there is an apostrophe, the string is not recognized.
Ex : "A blade of grass" : "un brin d'herbe" / "A beehive" : "Un nid d'abeilles".
To check the answer, I split the chain into a list : [un,nid,d'abeilles] Even if the user types "d'abeilles", it's never recognized as correct.
I noticed the same problem with the speech to text functionality : if the user says the word "s'habiller" (to get dressed), it is never found by my search function.
Anyone sees why this happens ? Would it be a "flutter" bug ?
In the app, I have a wordbank which was created with Microsoft Excel and then imported into visual studio. The wordbank is made up of WORD objects that have a series of parameters. Here is the one for blade of grass.
Word(
id: 37,
level: 6,
main: "blade of grass",
mainFr: "brin d'herbe",
theme: [
T(
e: "house",
f: "maison",
ste: ["in the garden"],
stf: ["dans le jardin"]),
T(
e: "nature",
f: "nature",
ste: ["in the meadow"],
stf: ["dans la prairie"])
],
articleEng: "a",
articleFr: "un",
nature: "noun",
plur: "blades of grass ",
ortho2: "",
phon: "ˈbleɪd əv ˈgrɑːs",
son: "",
remPhon: "",
french: [],
syn: [],
ant: [],
wDef: "a single thin flat piece of grass.",
wPhrase: "There was no wind at all. Not a leaf or blade of grass moved.",
wPhraseFr:
"Il n'y avait pas de vent du tour. Pas une feuille ni un brin d'herbe ne bougeait.",
past: [],
idiomsEn: [],
idiomsFr: [],
marqueur: "",
remarque: "",
),
'
but it was because of my own code. – Bologna'
) against "smart" right single quotation marks (U+2019’
) (or perhaps to other, similar Unicode characters)? I suggest printing therunes
for the strings to see a list of their Unicode code points to see where they aren't identical. – Predecease