The zero-width non-joiner (ZWNJ) is a non-printing character used in the computerization of writing systems that make use of ligatures. When placed between two characters that would otherwise be connected into a ligature, a ZWNJ causes them to be printed in their final and initial forms, respectively. This is also an effect of a space character, but a ZWNJ is used when it is desirable to keep the words closer together or to connect a word with its morpheme.
The ZWNJ is encoded in Unicode as ZERO WIDTH NON-JOINER (HTML
In certain languages, the ZWNJ is necessary for unambiguously specifying the correct typographic form of a character sequence.
|Correct (with ZWNJ)||Incorrect||Meaning|
(rendered from right to left):
||Persian 'I want to'|
(rendered from right to left):
||Old Hebrew 'be'|
||German 'edition' (compound of "auf"+"Lage")|
||German (regional) '(kind of) snack'|
(compound noun "Brot"+"Zeit" = 'bread time'),
shown in Fraktur
||Not a compound of "dea"+"fly", but the adverb of "deaf"|
||In Nepali "of husband" or "of respected person" according as what "" is used to represent (husband or respected person).|
||Bengali word for a carpenter's plane.|
||Wine in Nepalbhasa|
The picture shows how the code looks when it is rendered correctly, and in every row the correct and incorrect pictures should be different. If the correct display and the incorrect one look the same to you, or if either of them is significantly different from the corresponding picture, your system is not displaying the Unicode correctly.
In this Biblical Hebrew example, the placement of the meteg to the left of the segol is correct, which has a shva sign written as two vertical dots to denote short vowel. If a meteg were placed to the left of shva, it would be erroneous. In Modern Hebrew, there is no reason to use the meteg for spoken language, so it is rarely used in Modern Hebrew typesetting.
In German typography, ligatures may not cross the constituent boundaries within compounds. Thus, in the first German example, the prefix Auf- is separated from the rest of the word to prohibit the ligature fl. Similarly, in English, some argue ligatures should not cross morpheme boundaries. For example, in some words 'fly' and 'fish' are morphemes but in others they're not; therefore words like 'deafly' and 'selfish' should not have ligatures (respectively of fl and fi) while 'dayfly' and 'catfish' should have them.
Persian uses this character extensively for certain prefixes, suffixes and compound words. It is necessary for disambiguating compounds from non-compound words, which use a full space.
In Devanagari, the characters and ? typically combine to form , but when a ZWNJ is inserted between them, ? (code:
‌?) is seen instead.
In Kannada, the characters and ? combine to form , but when a ZWNJ is inserted between them, ? is displayed. That style is typically used to write non-Kannada words in Kannada script: "Facebook" is written as , though it can be written as . and are examples of other proper nouns that need ZWNJ.
In Bengali, when the Bengali letter ? occurs at the end of a consonant cluster--i.e., ? preceded by a (hôsôntô)--it appears in a special shape, , known as the ?- (ja-phala), such as in (? ? ?). However, when the Bengali letter ? occurs at the beginning of a consonant cluster--i.e., ? succeeded by a hôsôntô--it appears in a special shape, known as the (reph). Thus, the sequence ? ? ? is rendered by default as . When the ?- shape needs to be retained rather than the shape, the ZWNJ is inserted right after ?, i.e., ?‌ to render ?. ? is commonly used for loanwords from English such as (random). Words like (code:
?) where the hôsôntô needs to be displayed explicitly also require ZWNJ inserted after the hôsôntô.
The symbol to be used on keyboards which enable the input of the ZWNJ directly is standardized in Amendment 1 (2012) of ISO/IEC 9995-7:2009 "Information technology - Keyboard layouts for text and office systems - Symbols used to represent functions" as symbol number 81, and in IEC 60417 "Graphical Symbols for use on Equipment" as symbol no. IEC 60417-6177-2.