Soft hyphen

ISO symbol for soft hyphen

In computing and typesetting, a soft hyphen (Unicode U+00AD SOFT HYPHEN (­)) or syllable hyphen, is a code point reserved in some coded character sets for the purpose of breaking words across lines by inserting visible hyphens if they fall on the line end but remain invisible within the line.

Two alternative ways of using the soft hyphen character for this purpose have emerged, depending on whether the encoded text will be broken into lines by its recipient, or has already been preformatted by its originator.[1][2][3]

Text to be formatted by the recipient

The use of SHY characters in text that will be broken into lines by the recipient is the application context considered by the post-1999 HTML and Unicode specifications, as well as some word-processing file formats. In this context, the soft hyphen may also be called a discretionary hyphen or optional hyphen. It serves as an invisible marker used to specify a place in text where a hyphenated break is allowed without forcing a line break in an inconvenient place if the text is re-flowed. It becomes visible only after word wrapping at the end of a line.[4] The soft hyphen's Unicode semantics and HTML implementation are in many ways similar to Unicode's zero-width space, with the exception that the soft hyphen will preserve the kerning of the characters on either side when not visible. The zero-width space, on the other hand, will not, as it is considered a visible character even if not rendered, thus having its own kerning metrics.

To show the effect of a soft hyphen in HTML, the words of the following text (from the poem Spring and Fall by Gerard Manley Hopkins) have been separated with soft hyphens:

Margaret­Are­You­Grieving­Over­Goldengrove­Unleaving­Leaves­Like­The­Things­Of­Man­You­With­Your­Fresh­Thoughts­Care­For­Can­You­Ah­As­The­Heart­Grows­Older­It­Will­Come­To­Such­Sights­Colder­By­And­By­Nor­Spare­A­Sigh­Though­Worlds­Of­Wanwood­Leafmeal­Lie­And­Yet­You­Will­Weep­And­Know­Why­Now­No­Matter­Child­The­Name­Sorrows­Springs­Are­The­Same­Nor­Mouth­Had­No­Nor­Mind­Expressed­What­Heart­Heard­Of­Ghost­Guessed­It­Is­The­Blight­Man­Was­Born­For­It­Is­Margaret­You­Mourn­For

On HTML browsers supporting soft hyphens, resizing the window will re-break the above text only at word boundaries, and insert a hyphen at the end of each line.

Text preformatted by the originator

The SHY character is also used in text where paragraphs have already been broken into lines, such as certain plain text files, text sent to VT100-style terminal emulators or printers, or pages represented in page description languages. This is the application context originally considered by the EBCDIC and ISO 8859-1 standards and implemented in many VT100 terminal emulators.[1][2]

Here, SHY is a visible hyphen that is usually visually indistinguishable from a regular hyphen, but has been inserted solely for the purpose of line breaking. The purpose of the soft hyphen here is to distinguish it from any regular hyphen that might have been part of the original spelling of the word. This distinction helps re-use of already formatted text, when line breaks and soft hyphens inserted during word wrapping have to be removed to convert the text back into its unformatted form. For example, the copy or paste function of a terminal emulator can offer to replace line breaks with a space character, and remove any soft hyphens including any immediately following whitespace characters.

An example application that outputs soft hyphens for this reason is the groff text formatter as used on many Unix/Linux systems to display man pages.

Encodings and definitions

Soft hyphen (SHY) characters in coded characters sets, roughly in chronological order:

  • EBCDIC placed a SHY character (known there as a "syllable hyphen") at position 202 (0xCA hexadecimal).[1][5] IBM defined its purpose as a "hyphen used to divide a word at the end of a line [that] may be removed when a program adjusts lines."[6]
  • German standard DIN 31626 defined a C1 control code set defining 0x8D as an "Optional Syllabification Control (OSC)", a "print control character" for use marking syllable boundaries in long words. This C1 control set was registered in 1979.[7] (Note: this is not the same as the ISO/IEC 6429 C1 control code Operating System Command (OSC).)
  • ISO 8859-1:1986 (Latin 1) inherited SHY from EBCDIC, but called it "soft hyphen", placed it at position 0xAD (hexadecimal), and stated its purpose as "for use when a line break has been established within a word". Other ISO 8859 parts placed it at the same position, with the exception of ISO 8859-11 (Latin/Thai), which lacks it.
  • IBM code page 850 (an MS-DOS character set covering all ISO 8859-1 characters) placed it at position 240 = 0xF0.
  • SGML's "Numeric and Special Graphic" (isonum) character entity set (ISO 8879:1986) includes ­ for the ISO 8859-1 soft hyphen.
  • Unicode 1.0 (1991) and ISO 10646 (1993) took the first 256 code positions from ISO 8859-1, resulting in SHY at Unicode code point of U+00AD.
  • HTML 2 (1995) incorporated the "­" character entity from SGML, but explicitly discouraged its use.
  • HTML 4 (1999) redefined the purpose of the character as marking a hyphenation opportunity, which only becomes visible as a hyphen at the end of a line after formatting.
  • Unicode 4.0 (2002) changed the category of its SHY character from previously "Pd" (punctuation, dash) to "Cf" (other, format), thereby aligning its interpretation of the character with that of HTML 4.

Other commands for marking hyphenation opportunities in text formatting languages (similar to the HTML 4 and Unicode 4.0 interpretation of SHY):

Security issues

Soft hyphens, like other invisible characters, have been used to obscure malicious domains or URLs in e-mail spam.[9][10]

They are also used in emails to try to defeat spam prevention systems. For example, the phrase "I need your assista­nce discreetly" has a soft hyphen in the word assistance which may mean a mail system would not detect the phrase in the email body.[citation needed]

See also

References

  1. ^ a b c Jukka Korpela (January 2011). "Soft hyphen (SHY) – a hard problem?". Tampere University of Technology. Retrieved 8 April 2011.
  2. ^ a b Markus G. Kuhn (4 June 2003). "Unicode interpretation of SOFT HYPHEN breaks ISO 8859-1 compatibility" (PDF). Unicode Technical Committee. L2/03-155R.
  3. ^ Eric Muller (14 August 2002). "Yes, SOFT HYPHEN is a hard problem". Unicode Technical Committee. L2/02-279.
  4. ^ "CSS Text Module Level 3 Specification". W3C Candidate Recommendation Draft. World Wide Web Consortium (W3C). Retrieved 7 August 2022.
  5. ^ "Extended Binary-Coded Decimal Interchange Code - S/390". comsci.us. Retrieved 8 April 2011.
  6. ^ "Glossary". IBM. Retrieved 8 April 2011.
  7. ^ DIN (15 July 1979). Additional Control Functions for Bibliographic Use according to German Standard DIN 31626 (PDF). ITSCJ/IPSJ. ISO-IR-40.
  8. ^ "Commonly Confused Characters". Greg Baker, Simon Fraser University. Retrieved 12 July 2011.
  9. ^ "Spammers Using Soft Hyphen To Hide Malicious URLs". Slashdot. 7 October 2010. Retrieved 8 April 2011.
  10. ^ "Soft Hyphen – A New URL Obfuscation Technique". Symantec. Retrieved 8 April 2011.

Read other articles:

Salvator MundiGambar Salvator MundiSenimanLeonardo Da VinciTahunca.1499-1510Ukuran66 cm × 45 cm (26 in × 18 in)PemilikMuhammad bin Salman al-Saud, Putra Mahkota Kerajaan Saudi Arabia Salvator Mundi adalah lukisan karya Leonardo Da Vinci yang dibuat pertama kali pada tahun 1499 dan selesai tahun 1510. Lukisan ini dibeli oleh pangeran Saudi Arabia yakni, Muhammad bin Salman al-Saud pada tahun 2017 dengan harga US$ 450 juta.[1] Lukisan dengan j...

 

 

William C. deMille William C. deMille, all'anagrafe William Churchill de Mille (Washington, 25 luglio 1878 – Playa del Rey, 8 marzo 1955), è stato un drammaturgo, regista, sceneggiatore e produttore cinematografico statunitense. Diresse e sceneggiò pellicole durante l'epoca d'oro del cinema muto statunitense, producendo anche qualche film. Fu uno dei fondatori della Motion Picture Directors Association e poi della USC School of Cinematic Arts. Indice 1 Biografia 1.1 Carriera teatrale 1.2 ...

 

 

Single by Alexandra BurkeThe SilenceSingle by Alexandra Burkefrom the album Overcome Recorded2009–10Studio Album version: Henson (Los Angeles) Single mix: Metropolis (London) Genre Pop R&B Length3:35LabelSycoSongwriter(s) Nadir Khayat Bilal Hajji Savan Kotecha Producer(s)RedOneAlexandra Burke singles chronology Start Without You (2010) The Silence (2010) Elephant (2012) The Silence is a song by British singer Alexandra Burke from her debut studio album Overcome (2009). The song was...

Adam Nawałka Informasi pribadiNama lengkap Tomasz Nikodem HajtoTanggal lahir 16 Oktober 1972 (umur 51)Tempat lahir Maków Podhalański, PolandiaTinggi 189 m (620 ft 1 in)Posisi bermain BekKarier senior*Tahun Tim Tampil (Gol)1991–1993 Hutnik Kraków 32 (2)1993–1997 Górnik Zabrze 105 (8)1997–2000 MSV Duisburg 80 (8)2000–2004 Schalke 04 104 (6)2004–2005 1. FC Nürnberg 17 (0)2005–2006 Southampton 20 (0)2006 Derby County 5 (0)2006–2007 ŁKS Łódź 27 (1)2007�...

 

 

Запрос «Тенге» перенаправляется сюда; см. также другие значения. Тенге[a] каз. теңге/teñge англ. tenge[b] фр. tenge[b] 10 000 тенге 2012 года100 тенге 2019 года Коды и символы Коды ISO 4217 KZT (398) Символы ₸ Аббревиатуры ₸ • T • тңг Территория обращения Страна-эмитент  К...

 

 

Early British satellite research programme Ariel was a British satellite research programme conducted between the early 1960s and 1980s. Six satellites were launched as part of the programme, starting with the first British satellite, Ariel 1, which was launched on 26 April 1962, and concluding with the launch of Ariel 6 on 2 June 1979. The launch of Ariel 1 made Britain the third country to have a satellite orbiting the Earth.[1] The first four were devoted to studying the ionosphere...

1946 film by Frank Borzage Magnificent DollDirected byFrank BorzageScreenplay byIrving StoneProduced byJack H. SkirballStarringGinger RogersDavid Niven Burgess MeredithCinematographyJoseph A. ValentineEdited byTed J. KentMusic byHans J. SalterProductioncompanyHallmark ProductionsDistributed byUniversal PicturesRelease date November 28, 1946 (1946-11-28) Running time95 minutesCountryUnited StatesLanguageEnglish Magnificent Doll is a 1946 American historical drama film directed b...

 

 

NaradaResi pengelanaEjaan DewanagariनारदEjaan IASTNāradaNama lainNarada MuniGolonganDewaresi; awataralbs Narada (Dewanagari: नारद; ,IAST: Nārada, नारद) atau Narada Muni adalah seseorang yang bijaksana dalam tradisi Hindu, yang memegang peranan penting dalam kisah-kisah Purana, khususnya Bhagawatapurana. Narada digambarkan sebagai pendeta yang suka mengembara dan memiliki kemampuan untuk mengunjungi planet-planet dan dunia yang jauh. Ia selalu membawa alat m...

 

 

United States Army general and Superintendent of the United States Military Academy David H. Huntoon Jr.Born (1951-10-27) October 27, 1951 (age 72)Germany[1]Allegiance United States of AmericaService/branch United States ArmyYears of service1973-2013Rank Lieutenant GeneralCommands heldSuperintendent of the United States Military Academy, Commandant of the United States Army War CollegeAwardsDistinguished Service Medal with two oak leaf clusters, Legion of Merit (with fi...

Cette page contient des caractères spéciaux ou non latins. S’ils s’affichent mal (▯, ?, etc.), consultez la page d’aide Unicode. Pour les articles homonymes, voir Hiéroglyphe. Écritures hiéroglyphiques Hiéroglyphes sur le temple de Kôm Ombo. Caractéristiques Type Logogrammes et phonogrammes Langue(s) Ancien égyptien, moyen égyptien Historique Époque Du IVe millénaire avant notre ère au IVe siècle Créateur Anciens Égyptiens Système(s) dérivé(s) H...

 

 

Need to sacrifice consistency or availability in the presence of network partitions In theoretical computer science, the CAP theorem, also named Brewer's theorem after computer scientist Eric Brewer, states that any distributed data store can provide only two of the following three guarantees:[1][2][3] Consistency Every read receives the most recent write or an error. Availability Every request receives a (non-error) response, without the guarantee that it contains the...

 

 

National rail station and Tramlink tram stop in London This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: East Croydon station – news · newspapers · books · scholar · JSTOR (May 2019) (Learn how and when to remove this message) East Croydon East Croydon station and Tramlink stopEast CroydonLocation of East Croy...

Державний комітет телебачення і радіомовлення України (Держкомтелерадіо) Приміщення комітетуЗагальна інформаціяКраїна  УкраїнаДата створення 2003Керівне відомство Кабінет Міністрів УкраїниРічний бюджет 1 964 898 500 ₴[1]Голова Олег НаливайкоПідвідомчі ор...

 

 

Questa voce o sezione contiene informazioni riguardanti un evento calcistico futuro o in programma. Il contenuto potrebbe cambiare radicalmente non appena maggiori informazioni saranno disponibili. Per favore, non aggiungere speculazioni alla voce. Voce principale: UEFA Europa Conference League 2023-2024. Finale della UEFA Europa Conference League 2023-2024Informazioni generaliSport Calcio CompetizioneUEFA Europa Conference League 2023-2024 Data29 maggio 2024 CittàAtene ImpiantoStadio Agia ...

 

 

 烏克蘭總理Прем'єр-міністр України烏克蘭國徽現任杰尼斯·什米加尔自2020年3月4日任命者烏克蘭總統任期總統任命首任維托爾德·福金设立1991年11月后继职位無网站www.kmu.gov.ua/control/en/(英文) 乌克兰 乌克兰政府与政治系列条目 宪法 政府 总统 弗拉基米尔·泽连斯基 總統辦公室 国家安全与国防事务委员会 总统代表(英语:Representatives of the President of Ukraine) 总...

British rock duo The MarblesBackground informationOriginLondon, EnglandGenresPop, baroque popYears active1968 (1968)–1969 (1969)LabelsPolydor, CotillionMembersGraham BonnetTrevor Gordon The Marbles were an English rock duo that consisted of Graham Bonnet and Trevor Gordon, who operated between 1968 and 1969. Their only well-known singles were Only One Woman and The Walls Fell Down. They also became associated with the Bee Gees members Barry, Robin and Maurice Gibb at that time. On...

 

 

هذه المقالة تحتاج للمزيد من الوصلات للمقالات الأخرى للمساعدة في ترابط مقالات الموسوعة. فضلًا ساعد في تحسين هذه المقالة بإضافة وصلات إلى المقالات المتعلقة بها الموجودة في النص الحالي. (سبتمبر 2023) منتخب كندا للباندي تعديل مصدري - تعديل   منتخب كندا الوطني للباندي (بالإنجلي...

 

 

Multi-sport event in Kingston, Jamaica VIII British Empire and Commonwealth GamesHost cityKingston, JamaicaNations34Athletes1,316 (inc. officials)Events110 events in 10 sportsOpening4 August 1966Closing13 August 1966Opened byPrince Philip, Duke of EdinburghMain venueIndependence Park← VIIIX → The 1966 British Empire and Commonwealth Games was held in Kingston, Jamaica, from 4 to 13 August 1966. This was the first time that the Games had been held outside the so-called Wh...

Artikel ini bukan mengenai Dinosaurus. Untuk kegunaan lain, lihat Dinos (disambiguasi). Dinos dari Attika, k. 540 SM. Sekarang disimpan di Louvre, kode Cp 11243. Dalam tipologi tembikar Yunani kuno, dinos (bahasa Yunani Kuno: δῖνος, translit. dīnos)[1] atau deinos (bahasa Yunani Kuno: δεῖνος, translit. deīnos)[2] adalah mangkuk atau kancah pencampur. Dinos secara harfiah berarti 'cangkir minum', namun dalam tipologi modern digunakan (secara kel...

 

 

معركة نورفولك جزء من حرب الخليج الثانية دبابة عراقية من نوع أسد بابل متخندقة في معركة نورفولك، 26 فبراير 1991. معلومات عامة التاريخ 27 شباط 1991 البلد العراق  الموقع محافظة المثنى، العراق النتيجة انتصار التحالف المتحاربون  الولايات المتحدة المملكة المتحدة  العراق ال�...