Blog txtclean.site
This page contains 18 practical guides in English. The same topics are available in five language versions: Russian, English, Czech, German and Ukrainian.

Invisible Unicode characters: diagnose before cleaning
Two strings can look identical while containing different code points. This explains some comparison failures, but does not make every invisible character unwanted. First identify whether the failure concerns an identifier, prose or visual ordering.

Zero Width Space: find U+200B and remove only what is unwanted
ZWSP, U+200B, provides a line break opportunity without an ordinary visible space. Inside a product identifier it may break exact matching. In multilingual prose it may be an intentional boundary.

Soft Hyphen U+00AD: remove the hint, preserve the word
Soft Hyphen (SHY), U+00AD, marks a possible break inside a word. It is usually invisible when no break occurs; an application may display a hyphen at the break. It differs from the ordinary visible U+002D hyphen.

NBSP and narrow spaces: preserve typography, normalize data deliberately
Ordinary U+0020 and non-breaking U+00A0 look similar but behave differently. NBSP keeps a number with its unit, such as 10 kg. Narrow no-break space U+202F also serves typography. Replacement is appropriate when a data format expects ordinary spaces.

BiDi controls: stored order versus displayed order
Arabic or Hebrew mixed with Latin text and numbers may display in a different order from a simple code-point reading. The bidirectional algorithm handles this; control characters can refine direction. Their presence alone is not an attack.

Hidden characters in code and JSON: fix the failing location
The same invisible character may be valid inside a string and invalid between tokens. Identify the format and error position first. Blind cleaning can alter string values, indentation or meaningful newlines.

Unicode and SEO: verify usability, avoid magic-cleaning claims
If a copied title fails in a site’s internal search, differing code points may explain it. That does not establish how a search engine indexes the page. Invisible-character cleanup is not an SEO strategy or a guarantee of AdSense approval.

Copying from PDF and Word without losing text
A paste problem is not always an invisible character. PDF represents a page, and extracted reading order may differ. Compare one paragraph with the original first.

Email and forms: find stray characters without changing the address
Failed validation does not prove an invisible character is present. A form may impose its own restrictions or the address may contain a typo. Diagnose before transforming.

CSV import: normalize the field, preserve the structure
Mismatching keys can differ in spaces, case or data type. Start with two values that should match rather than cleaning an entire file.

C0/C1 control characters: what lives between U+0000 and U+009F
A practical C0/C1 diagnosis: how tabs and line endings differ from an accidental BEL, NUL or NEL, and why deleting the whole range is unsafe.

Unicode normalization: why identical letters can be different strings
NFC, NFD, NFKC and NFKD in practice: compare composed letters, avoid compatibility data loss and test collisions after conversion.

ZWJ and emoji: one picture, several code points
How U+200D joins emoji, why U+FE0F and modifiers matter, why platforms render sequences differently, and when ZWJ must stay.

Lookalike letters across scripts: Latin, Cyrillic and false matches
Distinguish Latin a from Cyrillic а, decide where mixed scripts matter, understand why normalization does not fix them, and validate identifiers safely.

Encoding error or invisible character: two different diagnoses
Tell mojibake and U+FFFD apart from ZWSP or NUL, avoid destructive re-encoding, and preserve the evidence needed for recovery.

File names and URLs: similar strings with different rules
Find ZWSP and whitespace in file names, keep paths separate from URLs, use percent-encoding safely and verify renames.

Markdown, YAML and XML: when whitespace becomes syntax
Diagnose hidden spaces and control characters in Markdown, YAML and XML without applying a destructive document-wide cleanup.

LF and CRLF line endings: why the whole file looks changed
Distinguish LF, CRLF and lone CR, detect mixed endings without double counting, protect binary data and reduce noisy diffs.