OSC 701 Set Locale
Set the locale rxvt-unicode reads its input in, or ask for it.
OSC 701 ; Pt ST
- ECMA-48
- §8.3.89 OSC – Operating System Command, p. 51
- Specification
- urxvt(7), XTerm Operating System Commands
OSC 701 ; Pt ST is rxvt-unicode’s: it sets the locale, and with it whether the input is UTF-8. OSC 701 ; ? ST asks for it, and the answer, OSC 701 ; locale ended the way the request was, carries the locale only when rxvt-unicode runs in its insecure mode, and is empty otherwise (urxvt(7)). mintty implements it too, says it came from rxvt-unicode, takes an empty Pt as the locale it was configured or started with, and answers a query only with a valid locale name (control sequences).
A default xterm has no OSC 701 and ignores it (the OSC numbers it knows). The cases follow xterm.
libghostty-vt does not recognize OSC 701 either: its OSC parser in osc.zig has no state for the number, so the string is dropped, and the cases pass.
Support
| Terminal | Version | Support | Notes |
|---|---|---|---|
| VT220 | manual, 2nd ed., 1984 | No | OSC is not among the controls it recognizes (§4.2) |
| VT510 | manual, 1st ed., 1993 | No | ignores an OSC string (chapter 4) |
| xterm | patch 412, xterm-411a | No | ignored |
| libghostty-vt | 83edd49 | No | ignored |
| Konsole | 26.11.70, a24c3d71 | No | not among the OSC numbers it handles (Vt102Emulation.h) |
| ConEmu | build 230724, its documentation | No | not in its ANSI escape codes |
| rxvt-unicode | 9.31, urxvtperl(3) | Yes | the query is answered only in insecure mode (urxvt(7)) |
| mintty | 3.8.3, its documentation | Yes | taken from rxvt-unicode (control sequences) |
Validation
OSC701-1: Setting it changes nothing on screen
A
\e]701;C.UTF-8\a
B
|AB____|
cursor 1,3
reply none
OSC701-2: A query is not answered
\e]701;?\a
|______|
reply none