Payload escaping and round trips
Wi-Fi payloads follow WIFI:T:WPA;S:…;P:…;;: \ ; , : " and CR/LF are backslash-escaped, while Chinese SSIDs remain UTF-8. Example: SSID Cafe;VIP and password p;:a\b plus newline become WIFI:T:WPA;S:Cafe\;VIP;P:p\;\:\,a\\b\nline2;; and parse back byte-for-byte.
Contacts use vCard 3.0: CRLF lines, N:family;given;;;, FN:, TEL;TYPE=CELL:; \ ; , and newlines are escaped, while a colon stays literal inside values (the property splits at the first colon). Chinese name and phone fields round-trip.
Fixed vectors cover these pure functions under node:test; real scanner clients were not tested and support for every vCard field is not promised.