How can I identify decorated text, e.g., overlining, using a macro?

I’m creating a Function to translate text in a cell into Morse Code. Morse Code has the notion of Prosigns, which are a sort of contraction or compacting of letters with special meaning. For example, “A” and “R” would normally be coded as “. _” followed by “. _ .” with a pause separating the letters but the Prosign AR, denoted with an overline, does away with the pause and would be coded “. _ . _ .”. Prosigns often (always?) use the same code as another character (in this case, “+”); the meaning is clear from context.

I would like to identify any overline text decorations in an input cell and compress the Morse Code representation accordingly in the output cell. What is the correct way to identify text decoration attributes? Thanks for your help.