On Wed, 28 Oct 2009, Przemysław Czerpak wrote: > > > hb_gtInfo( HB_GTI_WINTITLE, "string with accented chars" ) > > > doesn't seem to respect app CP (like now f.e. GTWVT does) > > > with GTXWC, accented chars don't appear correctly in title > > > bar. > > > I tried to fix it by converting to UTF8 in gtxwc.c, but I > > > may be missing something as it's still not right. > > this is a shot in the dark, but anyway. > > try adding > > XChangeProperty( wnd->dpy, wnd->window, > > XInternAtom( wnd->dpy, "_NET_WM_NAME", False ), > > XInternAtom( wnd->dpy, "UTF8_STRING", False ), > > 8, PropModeReplace, wnd->szTitle, strlen( wnd->szTitle )); > > right after calling XStoreName() in gtxwc.c (line 2965). > > It will work and in such case it should be enough to replace > XStoreName() with above XChangeProperty(). > But I'm interesting why you used _NET_WM_NAME property instead > of WM_NAME used by XStoreName().
net_wm_hints is supposed to be a newer standard than wm_hints (and it's probably there for a reason). now, i don't know too much about x programming, but i suppose that everything alive now speak net_wm, so it just seemed natural. > Anyhow for final version I suggest to use XSetWMName() instead > of manually update properties: according to the good old man, xsetwmname() sets wm_name, thus my manual way of setting net_wm_name instead. but whichever you see fit, i guess. if wm_name works too, without side effects, then so be it. > > if( wnd->fDspTitle ) > { > wnd->fDspTitle = FALSE; > if( wnd->szTitle ) > { > ULONG ulLen = hb_cdpStringInUTF8Length( wnd->hostCDP, TRUE, > wnd->szTitle, strlen( wnd->szTitle ) ); > char * pBuffer = ( char * ) hb_xgrab( ulLen + 1 ); > XTextProperty text; > > hb_cdpStrnToUTF8( wnd->hostCDP, TRUE, wnd->szTitle, strlen( > wnd->szTitle ), pBuffer ); > text.value = ( unsigned char * ) pBuffer; > text.encoding = s_atomUTF8String; > text.format = 8; > text.nitems = strlen( pBuffer ); > XSetWMName( wnd->dpy, wnd->window, &text ); > hb_xfree( pBuffer ); > } > else > XStoreName( wnd->dpy, wnd->window, "" ); > } > > best regards, > Przemek > _______________________________________________ > Harbour mailing list > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour > -- [-] mkdir /nonexistent _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour