Soft Hyphen - Handling

Handling

Additional semantics associated with the soft hyphen vary. According to the Unicode standard, a soft hyphen is not displayed if the line is not broken at that point. HTML4 describes it as a "hyphenation hint," though it suggests that that interpretation is not universal:

In HTML, there are two types of hyphens: the plain hyphen and the soft hyphen. The plain hyphen should be interpreted by a user agent as just another character. The soft hyphen tells the user agent where a line break can occur. Those browsers that interpret soft hyphens must observe the following semantics: If a line is broken at a soft hyphen, a hyphen character must be displayed at the end of the first line. If a line is not broken at a soft hyphen, the user agent must not display a hyphen character. For operations such as searching and sorting, the soft hyphen should always be ignored.

ISO 8859-1 specifies that it is always visible. EBCDIC has a SHY character, with "SHY" an abbreviation for "syllable hyphen," which is defined by IBM to mean a "hyphen used to divide a word at the end of a line may be removed when a program adjusts lines."

In most parts of ISO-8859 the soft hyphen is at position 0xAD (hexadecimal), and since the first 256 positions in Unicode are taken from ISO-8859-1, it has a Unicode codepoint of U+00AD. HTML 3.2 introduced a character entity for the soft hyphen, "­". In TeX and LaTeX the soft hyphen is represented by the command \- .

To show the effect of a soft hyphen, the following “wocka”s have been separated with soft hyphens

Pac-Man goes "wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka."

On browsers supporting soft hyphens, resizing the window will hyphenate the above text only as “wocka-”s (and never with, for example, “wock-”). On browsers not supporting soft hyphens, the above might appear as one very long line, or as several lines but without hyphens at the end of each broken line.

The soft hyphen's semantics and HTML implementation are in many ways similar to the zero-width space.

Read more about this topic:  Soft Hyphen

Famous quotes containing the word handling:

    It is curious how instinctively one protects the image of oneself from idolatry or any other handling that could make it ridiculous, or too unlike the original to be believed any longer.
    Virginia Woolf (1882–1941)

    Many more children observe attitudes, values and ways different from or in conflict with those of their families, social networks, and institutions. Yet today’s young people are no more mature or capable of handling the increased conflicting and often stimulating information they receive than were young people of the past, who received the information and had more adult control of and advice about the information they did receive.
    James P. Comer (20th century)

    Madam, a circulating library in a town is as an evergreen tree of diabolical knowledge; it blossoms through the year. And depend on it ... that they who are so fond of handling the leaves, will long for the fruit at last.
    Richard Brinsley Sheridan (1751–1816)