Happy to hear it's resolved. Although I think there should be a better way for the first part to not do that manually. I will add that later if I figure out.
By the way, to make this function more general to work in other cases and also to avoid writing very long lines which are hard to read and are prone to error, you can define all the changes in a dictionary and pass the key and value pairs of that dictionary to replace().
# a dictionary that can define required changes
# This way it can be edited easily
changes = {"$#a": "ʔ",
"$#b": "q̓",
"$#c": "ō",
"$#c": "ō",
"$#d": "á",
"$#e": "é",
"$#f": "ŝ",
"$#g": "ś",
"$#h": "ū",
"$#i": "·",
"$#j": "ⱡ"}
def fix_label_char(label:str, change_dict:dict, report:bool=False)->str:
"""Takes a str(text)and a dictionry of changes
then applies it to the text and
returns the new text (if any changes made),
otherwise original text gets returned.
It can also print the changes if report=True
report is off by default """
new_label = label
for key,val in change_dict.items():
new_label = new_label.replace(key, val)
# report section
if label == new_label and report:
print(f'No changes applied to {label}!')
elif label != new_label and report:
print(f'Changed {label} ---> {new_label}')
else:
pass
return new_label