In T138377 we added Iran in Farsi to the monuments database. While adding it to the database and generating https://fa.wikipedia.org/wiki/%DA%A9%D8%A7%D8%B1%D8%A8%D8%B1:LilyOfTheWest/Unused_images we ran into an interesting problem: Numbers on the fa wikipedia are in another script. Most scripts use 0123456789, but in Farsi a different script is used. The matching for the unused images is string based. The id in the list is matched by the sortkey of the images in https://commons.wikimedia.org/wiki/Category:Cultural_heritage_monuments_in_Iran_with_known_IDs .
Probably best solution:
- On import of the list apply a conversion function to the id's to convert them to 0123456789
- In https://commons.wikimedia.org/wiki/Template:Cultural_Heritage_Iran apply a conversion of the sortkey to 0123456789 if needed
The unused images page is still huge so no real rush to fix this. When it gets smaller this becomes more interesting because it might turn up more hits.