I guess I found the error.
I wrote simple test program:
#include <langinfo.h>
#include <stdio.h>
int main (int argc, char* argv[]) {
char* info = nl_langinfo(CODESET);
printf("codeset: %s\n", info);
}
And it wrote to me:
codeset: US-ASCII
My environment is:
LC_ALL=ru_RU.KOI8-R
LC_CTYPE=ru_RU.KOI8-R
LANG=ru_RU.KOI8-R
I also tried export CODESET=KOI8-R,
but it doesn't affect program output.
Could you give me some direction, how can I affect
codeset value of nl_langinfo? Thanks in advance.
I also attach backtrace of crush.
Had to fetch & install the latest awesome from git:
awesome (awesome) v3.0-rc5-7-g1ed65aa (Marshals Are Dead)
⢠Build: Aug 30 2008 20:20:36 for i386 by gcc version 4.2.1 ([EMAIL
PROTECTED])
⢠Image drawing engine: Imlib2
⢠D-Bus support: â
To crush I run:
% gvim "требования к менеджеру изображений.txt"
(the filename is in russian, encoding koi8-r).
Julien Danjou wrote:
Please, follow on -devel.
At 1220111489 time_t, Konstantin wrote:
What happened:
- Vim tried to put file name into window title.
- The file name was in KOI8-R.
- GMarkupParser thought it is UTF-8.
Quick patch to avoid such crushes is applied.
A better solution may be check system locale and recode string from locale
encoding
to UTF-8 as a fallback in case normal parse is failed.
If it crash, can you get me a full backtrace from gdb?
The windows titles are already converted tu UTF-8, if possible, see
client_updatetitle().
Cheers,
--
Konstantin Stepanov
Web Developer
#0 0x28609bd9 in strlen () from /lib/libc.so.7
#1 0x284759ee in lua_pushstring () from /usr/local/lib/liblua.so
#2 0x0805318d in luaA_client_index (L=0x83f4040) at
/usr/home/kstep/pkg/xcb/awesome/client.c:1299
#3 0x284797ef in lua_resume () from /usr/local/lib/liblua.so
#4 0x28479bf5 in lua_resume () from /usr/local/lib/liblua.so
#5 0x28481b33 in lua_newstate () from /usr/local/lib/liblua.so
#6 0x28483009 in lua_newstate () from /usr/local/lib/liblua.so
#7 0x28479c40 in lua_resume () from /usr/local/lib/liblua.so
#8 0x28475791 in lua_pushcclosure () from /usr/local/lib/liblua.so
#9 0x284793ab in lua_yield () from /usr/local/lib/liblua.so
#10 0x2847940f in lua_yield () from /usr/local/lib/liblua.so
#11 0x284755f7 in lua_pcall () from /usr/local/lib/liblua.so
#12 0x08072cbf in tasklist_draw (ctx=0x8363920, screen=0, w=0x83c8280,
offset=108, used=300, p=0x82aeca0,
type=AWESOME_TYPE_STATUSBAR) at lua.h:235
#13 0x08067592 in widget_render (wnode=0x83c8240, ctx=0x8363920, gc=6291479,
rotate_px=6291478, screen=0, position=Top, x=0,
y=0, object=0x82aeca0, type=AWESOME_TYPE_STATUSBAR) at
/usr/home/kstep/pkg/xcb/awesome/widget.c:167
#14 0x080622e6 in statusbar_refresh () at
/usr/home/kstep/pkg/xcb/awesome/statusbar.c:185
#15 0x0805043c in a_xcb_check_cb (loop=0x2846c820, w=0xbfbfeab8, revents=32768)
at event.h:35
#16 0x28468865 in ev_loop (loop=0x2846c820, flags=Variable "flags" is not
available.
) at ev.c:1699
#17 0x080511b5 in main (argc=1, argv=0xbfbfeb20) at
/usr/home/kstep/pkg/xcb/awesome/awesome.c:486