… | |
… | |
414 | </p> |
414 | </p> |
415 | <h3><a name="can_i_switch_the_fonts_at_runtime">Can I switch the fonts at runtime?</a></h3> |
415 | <h3><a name="can_i_switch_the_fonts_at_runtime">Can I switch the fonts at runtime?</a></h3> |
416 | <p>Yes, using an escape sequence. Try something like this, which has the same |
416 | <p>Yes, using an escape sequence. Try something like this, which has the same |
417 | effect as using the <code>-fn</code> switch, and takes effect immediately:</p> |
417 | effect as using the <code>-fn</code> switch, and takes effect immediately:</p> |
418 | <pre> |
418 | <pre> |
419 | printf '\e]50;%s\007' "9x15bold,xft:Kochi Gothic"</pre> |
419 | printf '\33]50;%s\007' "9x15bold,xft:Kochi Gothic"</pre> |
420 | <p>This is useful if you e.g. work primarily with japanese (and prefer a |
420 | <p>This is useful if you e.g. work primarily with japanese (and prefer a |
421 | japanese font), but you have to switch to chinese temporarily, where |
421 | japanese font), but you have to switch to chinese temporarily, where |
422 | japanese fonts would only be in your way.</p> |
422 | japanese fonts would only be in your way.</p> |
423 | <p>You can think of this as a kind of manual ISO-2022 switching.</p> |
423 | <p>You can think of this as a kind of manual ISO-2022 switching.</p> |
424 | <p> |
424 | <p> |
… | |
… | |
1001 | login script running within the rxvt-unicode window changes the locale to |
1001 | login script running within the rxvt-unicode window changes the locale to |
1002 | something else, e.g. <code>en_GB.UTF-8</code>. Needless to say, this is not going to work.</p> |
1002 | something else, e.g. <code>en_GB.UTF-8</code>. Needless to say, this is not going to work.</p> |
1003 | <p>The best thing is to fix your startup environment, as you will likely run |
1003 | <p>The best thing is to fix your startup environment, as you will likely run |
1004 | into other problems. If nothing works you can try this in your .profile.</p> |
1004 | into other problems. If nothing works you can try this in your .profile.</p> |
1005 | <pre> |
1005 | <pre> |
1006 | printf '\e]701;%s\007' "$LC_CTYPE"</pre> |
1006 | printf '\33]701;%s\007' "$LC_CTYPE"</pre> |
1007 | <p>If this doesn't work, then maybe you use a <code>LC_CTYPE</code> specification not |
1007 | <p>If this doesn't work, then maybe you use a <code>LC_CTYPE</code> specification not |
1008 | supported on your systems. Some systems have a <code>locale</code> command which |
1008 | supported on your systems. Some systems have a <code>locale</code> command which |
1009 | displays this (also, <code>perl -e0</code> can be used to check locale settings, as |
1009 | displays this (also, <code>perl -e0</code> can be used to check locale settings, as |
1010 | it will complain loudly if it cannot set the locale). If it displays something |
1010 | it will complain loudly if it cannot set the locale). If it displays something |
1011 | like:</p> |
1011 | like:</p> |
… | |
… | |
1052 | </p> |
1052 | </p> |
1053 | <h3><a name="can_i_switch_locales_at_runtime">Can I switch locales at runtime?</a></h3> |
1053 | <h3><a name="can_i_switch_locales_at_runtime">Can I switch locales at runtime?</a></h3> |
1054 | <p>Yes, using an escape sequence. Try something like this, which sets |
1054 | <p>Yes, using an escape sequence. Try something like this, which sets |
1055 | rxvt-unicode's idea of <code>LC_CTYPE</code>.</p> |
1055 | rxvt-unicode's idea of <code>LC_CTYPE</code>.</p> |
1056 | <pre> |
1056 | <pre> |
1057 | printf '\e]701;%s\007' ja_JP.SJIS</pre> |
1057 | printf '\33]701;%s\007' ja_JP.SJIS</pre> |
1058 | <p>See also the previous answer.</p> |
1058 | <p>See also the previous answer.</p> |
1059 | <p>Sometimes this capability is rather handy when you want to work in |
1059 | <p>Sometimes this capability is rather handy when you want to work in |
1060 | one locale (e.g. <code>de_DE.UTF-8</code>) but some programs don't support it |
1060 | one locale (e.g. <code>de_DE.UTF-8</code>) but some programs don't support it |
1061 | (e.g. UTF-8). For example, I use this script to start <code>xjdic</code>, which |
1061 | (e.g. UTF-8). For example, I use this script to start <code>xjdic</code>, which |
1062 | first switches to a locale supported by xjdic and back later:</p> |
1062 | first switches to a locale supported by xjdic and back later:</p> |
1063 | <pre> |
1063 | <pre> |
1064 | printf '\e]701;%s\007' ja_JP.SJIS |
1064 | printf '\33]701;%s\007' ja_JP.SJIS |
1065 | xjdic -js |
1065 | xjdic -js |
1066 | printf '\e]701;%s\007' de_DE.UTF-8</pre> |
1066 | printf '\33]701;%s\007' de_DE.UTF-8</pre> |
1067 | <p>You can also use xterm's <code>luit</code> program, which usually works fine, except |
1067 | <p>You can also use xterm's <code>luit</code> program, which usually works fine, except |
1068 | for some locales where character width differs between program- and |
1068 | for some locales where character width differs between program- and |
1069 | rxvt-unicode-locales.</p> |
1069 | rxvt-unicode-locales.</p> |
1070 | <p> |
1070 | <p> |
1071 | </p> |
1071 | </p> |