Use of Soft Hyphens in Data
Description
What are Soft Hyphens, how are they used, and how can Loftware make use of Soft Hyphens?
Explanation
Soft Hyphens are hyphens available through the Character Map utility (charmap.exe) that do not print. They can be added to data using Keystroke Alt-0173. You will notice that the cursor does not move, but if you were to backspace through that location you would notice that an extra backspace key stroke is needed to remove the Soft Hyphen.
They are used in data where legitimate line breaks can be inserted in long strings of characters. For example; long chemical names like ribulosebisphosphatecarboxylaseoxygenase.
Imagine if the above 40-character word needed to be printed in an area that only accommodated 25 characters per line. The output from paragraph would be:
<pre class="syntaxhighlighter-pre" xml:space="preserve">ribulosebisphosphatecarbo
xylaseoxygenase
</pre>
The break at this point is not permitted so the data is formatted with Soft Hyphens to indicate appropriate break locations without changing how the data prints.
The following example shows how the data would look if the Soft Hyphens were replaced by standard Hyphens.
<pre class="syntaxhighlighter-pre" xml:space="preserve">ribulose-bisphosphate-carboxylase-oxygenase
</pre>
You can use a field level script routine to search for the Soft Hyphens using the Soft Hyphen hex value "\u00AD".
The script can then count the number of characters and break the lines out at the appropriate location changing the output to:
<pre class="syntaxhighlighter-pre" xml:space="preserve">ribulosebisphosphate
carboxylaseoxygenase
</pre>
Note: The full script is not included here due to the complexity of the script and focus of this article.
Article Number
2014010
Versions
LLM/LPSVersion 9.5 an above
Environment
All supported installation environments.