Zero-Width Space
Ký tự vô hình có độ rộng hiển thị bằng không (U+200B). Được sử dụng như gợi ý ngắt dòng và kiểm soát xử lý văn bản.
Khoảng trắng độ rộng không (U+200B) là ký tự vô hình có độ rộng hiển thị bằng không. Nothing appears on screen, but it exists in the text data and counts as one character. It primarily functions as a line break opportunity hint, allowing browsers to wrap lines at its position. In Unicode's "General Category," it is classified as a format character (Cf).
Khoảng trắng độ rộng không trở nên quan trọng trong nhiều tình huống thực tế. In languages like Thai and Khmer that don't use spaces between words, zero-width space marks word boundaries and enables proper line breaking. In web development, inserting zero-width spaces within long strings without spaces (like URLs or hash values) allows line wrapping without breaking layout. In HTML, it can be inserted as ​ or ​. Unicode detailed guides explain invisible character mechanisms.
Các ký tự vô hình liên quan bao gồm Zero-Width Non-Joiner (U+200C, ZWNJ), which prevents joining and is used in Persian and Hindi script, and Zero-Width Joiner (U+200D, ZWJ), which promotes character joining and is used in emoji ZWJ sequences (like family emoji). All these invisible characters have zero display width but carry different meanings in text processing.
Từ góc độ bảo mật, khoảng trắng độ rộng không có thể bị khai thác cho fingerprinting (embedding invisible identifiers in text). This technique embeds zero-width character patterns in confidential documents to identify leak sources. Phishing attacks inserting zero-width characters in domain names to mimic legitimate domains have also been reported. Input sanitization should consider removing zero-width characters.
Một vấn đề phổ biến là bao gồm khoảng trắng độ rộng không không chủ ý qua sao chép-dán. When text copied from web pages contains zero-width spaces, string comparisons fail despite identical appearance, searches miss results, and passwords don't work. Since debugging is difficult, adding a zero-width character removal step as text preprocessing is recommended.
Đối với đếm ký tự, khoảng trắng độ rộng không được tính là một ký tự mặc dù vô hình, causing discrepancies between visible and actual character counts. For example, "Hello" with 3 zero-width spaces inserted between characters appears as 5 characters but is actually 8. Character counting tools that detect invisible characters and warn users help catch such issues early. Character encoding fundamentals books are also helpful references.