… | |
… | |
281 | |
281 | |
282 | Can I switch the fonts at runtime? |
282 | Can I switch the fonts at runtime? |
283 | Yes, using an escape sequence. Try something like this, which has the |
283 | Yes, using an escape sequence. Try something like this, which has the |
284 | same effect as using the "-fn" switch, and takes effect immediately: |
284 | same effect as using the "-fn" switch, and takes effect immediately: |
285 | |
285 | |
286 | printf '\e]50;%s\007' "9x15bold,xft:Kochi Gothic" |
286 | printf '\33]50;%s\007' "9x15bold,xft:Kochi Gothic" |
287 | |
287 | |
288 | This is useful if you e.g. work primarily with japanese (and prefer a |
288 | This is useful if you e.g. work primarily with japanese (and prefer a |
289 | japanese font), but you have to switch to chinese temporarily, where |
289 | japanese font), but you have to switch to chinese temporarily, where |
290 | japanese fonts would only be in your way. |
290 | japanese fonts would only be in your way. |
291 | |
291 | |
… | |
… | |
906 | |
906 | |
907 | The best thing is to fix your startup environment, as you will likely |
907 | The best thing is to fix your startup environment, as you will likely |
908 | run into other problems. If nothing works you can try this in your |
908 | run into other problems. If nothing works you can try this in your |
909 | .profile. |
909 | .profile. |
910 | |
910 | |
911 | printf '\e]701;%s\007' "$LC_CTYPE" |
911 | printf '\33]701;%s\007' "$LC_CTYPE" |
912 | |
912 | |
913 | If this doesn't work, then maybe you use a "LC_CTYPE" specification not |
913 | If this doesn't work, then maybe you use a "LC_CTYPE" specification not |
914 | supported on your systems. Some systems have a "locale" command which |
914 | supported on your systems. Some systems have a "locale" command which |
915 | displays this (also, "perl -e0" can be used to check locale settings, as |
915 | displays this (also, "perl -e0" can be used to check locale settings, as |
916 | it will complain loudly if it cannot set the locale). If it displays |
916 | it will complain loudly if it cannot set the locale). If it displays |
… | |
… | |
962 | |
962 | |
963 | Can I switch locales at runtime? |
963 | Can I switch locales at runtime? |
964 | Yes, using an escape sequence. Try something like this, which sets |
964 | Yes, using an escape sequence. Try something like this, which sets |
965 | rxvt-unicode's idea of "LC_CTYPE". |
965 | rxvt-unicode's idea of "LC_CTYPE". |
966 | |
966 | |
967 | printf '\e]701;%s\007' ja_JP.SJIS |
967 | printf '\33]701;%s\007' ja_JP.SJIS |
968 | |
968 | |
969 | See also the previous answer. |
969 | See also the previous answer. |
970 | |
970 | |
971 | Sometimes this capability is rather handy when you want to work in one |
971 | Sometimes this capability is rather handy when you want to work in one |
972 | locale (e.g. "de_DE.UTF-8") but some programs don't support it (e.g. |
972 | locale (e.g. "de_DE.UTF-8") but some programs don't support it (e.g. |
973 | UTF-8). For example, I use this script to start "xjdic", which first |
973 | UTF-8). For example, I use this script to start "xjdic", which first |
974 | switches to a locale supported by xjdic and back later: |
974 | switches to a locale supported by xjdic and back later: |
975 | |
975 | |
976 | printf '\e]701;%s\007' ja_JP.SJIS |
976 | printf '\33]701;%s\007' ja_JP.SJIS |
977 | xjdic -js |
977 | xjdic -js |
978 | printf '\e]701;%s\007' de_DE.UTF-8 |
978 | printf '\33]701;%s\007' de_DE.UTF-8 |
979 | |
979 | |
980 | You can also use xterm's "luit" program, which usually works fine, |
980 | You can also use xterm's "luit" program, which usually works fine, |
981 | except for some locales where character width differs between program- |
981 | except for some locales where character width differs between program- |
982 | and rxvt-unicode-locales. |
982 | and rxvt-unicode-locales. |
983 | |
983 | |