Post by tsh73 on Feb 21, 2023 21:17:44 GMT
Well, I could not help to solve your problem
Because I don't even have these accented letters
But I wrote program along lines I said earlier
You explain it what letters considered the same
(just for example,
'v-w-u
'a-o
's-c-k
)
And it converts all letters from a group to first one
So
"Your dreams will come true!"
becomes
"Yavr dreams vill same trve!"
, "some" will match "came" etc etc ;)
Because I don't even have these accented letters
But I wrote program along lines I said earlier
You explain it what letters considered the same
(just for example,
'v-w-u
'a-o
's-c-k
)
And it converts all letters from a group to first one
So
"Your dreams will come true!"
becomes
"Yavr dreams vill same trve!"
, "some" will match "came" etc etc ;)
'Write your own function that takes raw strings,
'(internally)
'. replace accented characters to ordinary ones
'. and do compare.
'Return True or False (1 or 0)
'since different locales have different accents
'(and things I do have on my keyboard is not similar to yours)
'let's arbitrary group letters we consider "similar"
'Like, I will on a whim consider equal
'v-w-u
'a-o
's-c-k
'(you just put in your accented letters)
'now let's make recode strings
'first is all printable (codes >=32) characters
'(it might be shorter but it should contain all letters you care about)
src$=""
for i = 32 to 127: src$=src$+chr$(i): next
'you likely will use second part (128..255) as well
'for i = 32 to 255: src$=src$+chr$(i): next
print src$
'here it is... excuse me having a problem with (")
'so replace it with "+chr$(34)+"
src$ = " !"+chr$(34)+"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
'Second is same line but with all letters of a group (say v-w-u) manually changed to first one
repl$ = " !"+chr$(34)+"#$%&'()*+,-./0123456789:;<=>?@ABSDEFGHIJSLMNAPQRSTVVVXYZ[\]^_`absdefghijslmnapqrstvvvxyz{|}~"
'now all letters could be replaced, using src$ as index and repl$ as data
s$ ="Your dreams will come true!"
r$=""
for i = 1 to len(s$)
r$=r$+mid$(repl$, instr(src$, mid$(s$,i,1)), 1)
next
print s$
print r$