I don't know about other languages but for your example
أحمد ماهر = Ahmed Maher
What I know is romanizations doesn't work with it
Why? because of the inflection and the letters "movements" that give the one letter more than one pronunciation. for example
مَح = Mah
مُح = Muh
Same letters but with a different pronunciation.
The solution that I've made is rules to convert the names
You can find the code and the npm package that I've made.
If you got any questions, issues or you tried to understand the rules for the Arabic I will be happy to help.
Please check below to know more about the needed rules to convert an Arabic name:
First Letter Rule
I am checking if the letter was the first letter since if the letter “و” was the first one people tend to write it “W” but if it was inside the word it will be written “O”.
Inner Letter Rule
By this I mean all the letters that are not the first nor the last and it will be changed based letter like the first image “م” will equal “H”
Next Letter Rule
In this rule am checking the letter and the upcoming one. like
if the letter was “م” and the next one was “ع” it should be written ”Mua”
if the letter was “م” and the next one was “ي” it should be written “May”

Special Letter Rule
It looks like the next letter rule but it will include another action like “slice”
ex: in the “First Letter Rule” I said that “و” inside the word will be converted to “O”
.”ا" I will need to delete the “O” and put a “w” then “A” for the ”ا“ But if the next letter was And I believe this rule could be enhanced but it’s important to have.
Last Letter Rule
Without this rule, the name “Sarah” will be converted from Arabic to “Sara”
This rule checks if the last letter is “ه“ ”ة” if it is it will add the “H” to complete the name.