Stripping non-breaking hyphens in Word
The non-breaking hyphen is a useful device. It is a special character that ensures that “Greco-Roman” in “Greco-Roman wrestling” never splits across two lines. Similarly, it helps avoid “gemischte EU-Mutterfinanzholdinggesellschaften” splitting as gemischte EU- / Mutterfinanzholdinggesellschaften (see e.g. Article 1, para. 1 no. 4 BaSAG for a typical usage!) or similar compound nouns in legal translations. In the latter case, if hyphenation is turned on in narrow columns, you end up with some strange-looking lines.
However, for translators using CAT tools, it can be annoying, with non-breaking hyphens rendered as tags in the source text. This can cause problems in the CAT tool as it will flag the target text as missing a tag. Fortunately there is a simple way in Word to search and replace all non-breaking hyphens, to get around this problem. Once you have mastered this for non-breaking hyphens there are other use cases for other special characters.
What to do in Word
There is a wildcard (similar to a regular expression) in Word for finding non-breaking hyphens – which is ^~. To use it, extend the Search/replace dialogue (Ctrl + H) by clicking on “More > >” and then select the wildcards option. Alternatively you can add this wildcard character through the “Special” button at the bottom of this dialogue. Then do a search/replace for all instances.
Naturally, going through a lot of documents can become a time-consuming process. Help is at hand in the form of a macro. If you use it a bit, it definitely warrants having a Word Macro for this, which appears below.
Sub ChangeNonBreakHyphen()
'
' ChangeNonBreakHyphen Makro
' Converts non-breaking hyphens into a normal hyphen.
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^~"
.Replacement.Text = "-"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Add it to your macros in Word through the Developer tab. I even have it added to my ribbon tab containing all my translation macros. You may find other special characters that can be treated in a similar manner.
If you discover a slew of non-breaking hyphens in the middle of your source text in Trados, there is an easy solution. You can clean up the Word document, add it to your translation project again, and run a Perfect Match. afterwards.
One thought on “Stripping non-breaking hyphens in Word”