New answers tagged


The applications defaults files for xterm are designed to include XTerm-color using a different route. This resource *customization: -color would tell the X Toolkit library to load a resource file ending with "-color". There are several app-defaults files installed for xterm. Looking at my /etc/X11/app-defaults, these are the main ones: -rw-r--r-- 1 ...


A pure bash version: #!/bin/bash number="$1" number=${number//۱/1} number=${number//۲/2} number=${number//۳/3} number=${number//۴/4} number=${number//۵/5} number=${number//۶/6} number=${number//۷/7} number=${number//۸/8} number=${number//۹/9} number=${number//۰/0} echo "Result is $number" Have tested in my Gentoo machine and it works. ./convert ۱۳۲ ...


Since iconv can't seem to grok this, the next port of call would be to use the tr utility: $ echo "۲۱" | tr '۰۱۲۳۴۵۶۷۸۹' '0123456789' 21 tr translates one set of characters to another, so we simply tell it to translate the set of Farsi digits to the set of Latin digits. EDIT: As user @cuonglm points out. This requires non-GNU tr, for example the tr on a ...


Since it's a fixed set of numbers, you can do it by hand: $ echo ۲۱ | LC_ALL=en_US.UTF-8 sed -e 'y/۰۱۲۳۴۵۶۷۸۹/0123456789/' 21 (or using tr, but not GNU tr yet) Setting your locale to en_US.utf8 (or better to the locale which characters set belongs to) is required for sed to recognize your characters set. With perl: $ echo "۲۱" | perl -CS -MUnicode::...


For Python there is the unidecode library which handles such conversions in general: In Python 2: >>> from unidecode import unidecode >>> unidecode(u"۰۱۲۳۴۵۶۷۸۹") '0123456789' In Python 3: >>> from unidecode import unidecode >>> unidecode("۰۱۲۳۴۵۶۷۸۹") '0123456789' The SO ...


I struggled with this also for a while. What help with me was installing this: And adding the line XTerm*faceName: DejaVu Sans Mono for Powerline into ~/.Xresources. After that: xrdb ~/.Xresources And then reopening xterm.


xterm uses a single font, rather than font sets which are supported by several other terminals. The pseudo-graphic characters in this (pasted from xterm): ⎛ ⎽⎽⎽⎽⎽⎽⎽ ⎞ ⎜ ╱ 3 ⎟ ⎜ ╱ x ⎟ ⎜ ╱ ───── , 1⎟ ⎝╲╱ x + 1 ⎠ are not provided by the TypeType font specified here: xterm.vt100.faceName: Terminus xterm.vt100.faceSize: 14 ...


.tmux.conf set -g utf8 on Fixed the exact same issue for me.


Following this link solves my problem: sudo localectl set-locale LANG=en_CA.UTF-8 # or change to en_US.UTF-8 depends on your locale-gen it generates a file /etc/locale.conf that fixes this issue

Top 50 recent answers are included