/** * Does this environment declare a UTF-8 locale? The POSIX variables are checked in the order the C * library resolves them (LC_ALL overrides LC_CTYPE overrides LANG). * * Windows terminals declare none of these and are handled as UTF-8: modern Windows Terminal and * PowerShell render it, and the failure this guards against is a Unix locale that says C/POSIX. */ export declare function terminalRendersUnicode(env?: NodeJS.ProcessEnv): boolean; /** * Rewrite a string so a non-UTF-8 terminal can read it. A no-op when the terminal handles Unicode, * so the good case keeps every glyph it was designed with. * * Characters with no declared fallback are replaced with `?` rather than passed through: passing * them through is what produced `���` in the first place, and one `?` is at least legible as * "something did not survive". */ export declare function forTerminal(text: string, env?: NodeJS.ProcessEnv): string;