เว็บและ HTML

ตัวเชื่อมคำ

U+2060 อักขระความกว้างศูนย์ที่ป้องกันการขึ้นบรรทัดใหม่ เป็นการแทนที่สมัยใหม่ของ U+FEFF (BOM) ในฐานะ zero-width no-break space

· Updated

What Is the Word Joiner?

The Word Joiner (WJ) is Unicode character U+2060. It is an invisible, zero-width character whose sole purpose is to prevent line breaks at the position where it is inserted. Unlike a non-breaking space (U+00A0), the word joiner has no visible width — it takes up no space in the rendered text.

The word joiner was introduced in Unicode 3.2 as a replacement for the deprecated Zero Width No-Break Space (ZWNBSP, U+FEFF) when used in a non-BOM context.

How It Works

Line-breaking algorithms in text renderers follow Unicode line-break properties. Normally, line breaks are permitted between most characters. Inserting U+2060 between two characters signals to the renderer: "do not break here." The algorithm treats the adjacent characters as though they are joined by a non-breakable bond.

"some text" + WJ + "more text"
→ "some text⁠more text" (no line break permitted between the two strings)

The WJ is analogous to CSS white-space: nowrap applied at the character level, but it operates in plain text contexts where CSS is unavailable.

When to Use the Word Joiner

Inline code in flowing text: Prevent a hyphenated or compound identifier from breaking across a line.

Abbreviations and numbers: Keep 3⁠km, fig.⁠1, or no.⁠42 together.

Non-breaking compound words: Technical terms, product names, or phrases that lose meaning if split.

After soft hyphens: Occasionally used to counteract an otherwise-permitted break point.

WJ vs. Non-Breaking Space vs. ZWNBSP

Character Code Point Width Prevents Break Common Use
Non-Breaking Space U+00A0 One space width Yes Keep words together with a visible space
Word Joiner U+2060 Zero Yes Prevent break without adding space
ZWNBSP (deprecated WJ use) U+FEFF Zero Yes (legacy) Replaced by WJ; now used only as BOM
Zero-Width Space U+200B Zero No (break opportunity) Allow breaks inside long words

Code Examples

# Inserting WJ in Python
WJ = "\u2060"

product_name = f"Django{WJ}REST{WJ}Framework"
# Prevents line breaks between the components

# Removing WJ (e.g., for search normalization)
text = "some\u2060text"
cleaned = text.replace("\u2060", "")  # "sometext"

# Or with unicodedata
import unicodedata
unicodedata.category("\u2060")  # "Cf" (Format character)
const WJ = "\u2060";
const label = `3${WJ}km`;  // "3⁠km" — no break between 3 and km

// Check for WJ
label.includes("\u2060");  // true

// Strip format characters (including WJ)
label.replace(/\p{Cf}/gu, "");  // "3km"
<!-- In HTML -->
<p>See figure&#x2060;3 for details.</p>
<!-- Or use the named entity (if defined): &#8288; -->
<p>3&#8288;km from downtown.</p>

Browser and Rendering Support

The word joiner is well-supported in modern browsers and text rendering engines. In HTML, it can also be written as &#x2060; or &#8288;. Some content management systems and WYSIWYG editors strip invisible characters — in those cases, use CSS white-space: nowrap on a <span> instead.

  • U+200D Zero Width Joiner (ZWJ): Joins emoji into sequences (e.g., family emoji); also prevents breaks.
  • U+2011 Non-Breaking Hyphen: A hyphen that prevents line breaks.
  • U+00AD Soft Hyphen: The opposite — a suggested break point, displayed as a hyphen only if the line actually breaks there.

Quick Facts

Property Value
Code point U+2060
Name WORD JOINER
Category Cf (Format character)
Width Zero (invisible, no advance width)
Function Prevents line break at insertion point
HTML entity &#x2060; or &#8288;
Unicode version introduced 3.2
Replaces U+FEFF used as ZWNBSP (now deprecated for this purpose)

คำศัพท์ที่เกี่ยวข้อง

เพิ่มเติมใน เว็บและ HTML

CSS Text Direction

CSS properties (direction, writing-mode, unicode-bidi) controlling text layout direction. Works with Unicode …

HTML เอนทิตี

การแทนค่าอักขระในรูปแบบข้อความใน HTML สามรูปแบบ: ชื่อ (&amp;), ทศนิยม (&#38;), เลขฐานสิบหก (&#x26;) จำเป็นสำหรับอักขระที่ขัดแย้งกับไวยากรณ์ HTML

Internationalized Domain Name (IDN)

ชื่อโดเมนที่มีอักขระ Unicode ที่ไม่ใช่ ASCII เก็บไว้ภายในเป็น Punycode (xn--...) แต่แสดงเป็น Unicode ให้ผู้ใช้เห็น ความกังวลด้านความปลอดภัย: การโจมตีแบบ …

JavaScript Intl API

ECMAScript Internationalization API providing locale-aware string comparison (Collator), number formatting (NumberFormat), date …

Punycode

การเข้ารหัสที่เข้ากันได้กับ ASCII สำหรับชื่อโดเมน Unicode แปลงป้ายกำกับที่ถูก internationalize เป็นสตริง ASCII ที่มีคำนำหน้า xn-- münchen.de → …

Unicode in CSS

CSS supports Unicode via escape sequences (\2713 for ✓), the content property …

การอ้างอิงอักขระ XML

เวอร์ชัน XML ของการอ้างอิงอักขระเชิงตัวเลข: &#x2713; หรือ &#10003; XML มีเพียง 5 entity ที่มีชื่อ (&amp; …

การอ้างอิงอักขระที่มีชื่อ

HTML entity ที่ใช้ชื่อที่อ่านง่าย: &copy; → ©, &mdash; → — HTML5 กำหนด 2,231 …

การอ้างอิงอักขระเชิงตัวเลข

HTML entity ที่ใช้หมายเลข code point Unicode: ทศนิยม (&#169; → ©) หรือเลขฐานสิบหก (&#xA9; …

การเข้ารหัสเปอร์เซ็นต์ (URL encoding)

การเข้ารหัสอักขระที่ไม่ใช่ ASCII และอักขระที่สงวนไว้ใน URL โดยแทนที่แต่ละไบต์ด้วย %XX ใช้ UTF-8 ก่อน แล้วเข้ารหัส percent แต่ละไบต์: …