New answers tagged

3

An application running in a terminal has no way to find out from the terminal what the glyphs that the terminal has drawn look like (or even if they are substitute/placeholder characters). One thing the application can do is find out if the terminal supports UTF-8 at all, and if it does, if it supports variable width characters. The method is as follows: ...


1

This works with OS X's tr but not with GNU tr: tr '[:lower:]' '[:upper:]' This works with gawk but not with mawk or nawk (which is /usr/bin/awk in OS X): awk '{print toupper($0)}' Another option is to use GNU sed: sed 's/./\u&/g' In Bash 4.0 and later you can also use the ^^ parameter expansion: while IFS= read -r l;do printf %s\\n ...


4

short: xterm uses a single font (except for the special cases of double-width characters), while the other terminals use additional fonts (and they use those fonts for the characters not found in your requested font). long: the character you are interested in is not part of the font, which appears to be something like fonts-hack-tty in Debian. The missing ...


1

As Thomas Dickey explains, xterm has no built-in way to input characters by codepoint. (Presumably because that's pretty bad UX.) Vim does, though: in insert mode, press Ctrl+V then u then 4 hex digits (or Ctrl+V then U then 8 hex digits). For a more convenient way to input characters, use Compose, digraphs (which are Vim's built-in compose facility), or an ...


4

xterm doesn't implement a hexadecimal-input feature because all of the text editors which handle UTF-8 provide their own equivalents (emacs, vim and vile, of course, even nano). This could be useful in a shell script, but is not often mentioned. The feature was first implemented in Windows, of course. To enter multibyte (e.g., UTF-8) characters in xterm, ...



Top 50 recent answers are included