Re: [hackers] [tabbed][PATCH] Use utf8 for window name
In Thu, 11 Jun 2020 08:47:09 +0200 Laslo Hunhold wrote: > On Thu, 11 Jun 2020 11:42:40 +0500 > Nikita Zlobin wrote: > > Dear Nikita, > > > One more reason to propose utf. I have read this to better > > understand Xft: https://keithp.com/~keithp/talks/xtc2001/paper > > > > It mentions, that Xft requires unicode. Not sure, what unicode type > > is meant, but at least Xft manual hs Utf(x) suffixed functions, > > though no with Ucs(x). > > exactly, UTF-8 should be everywhere. There are other complexities in > program and it's a myth to me why people are still trying to keep the > encoding space heterogenous. I know there are legacy applications and > file formats, but that shouldn't be our worry. > > With best regards > > Laslo > Thanks. Meanwhile I found more uses for Xmb* stuff, whose change would two of my patches. Not completely sure if mb->utf8 conveersion is necessary for any xprop-related code. One pro for this - same function instead of two, yet utf8 is ascii compatible. Well if there were no mb at all, I would think more than once in case of gettextprop.
Re: [hackers] [tabbed][PATCH] Use utf8 for window name
On Thu, 11 Jun 2020 11:42:40 +0500 Nikita Zlobin wrote: Dear Nikita, > One more reason to propose utf. I have read this to better understand > Xft: https://keithp.com/~keithp/talks/xtc2001/paper > > It mentions, that Xft requires unicode. Not sure, what unicode type is > meant, but at least Xft manual hs Utf(x) suffixed functions, though no > with Ucs(x). exactly, UTF-8 should be everywhere. There are other complexities in program and it's a myth to me why people are still trying to keep the encoding space heterogenous. I know there are legacy applications and file formats, but that shouldn't be our worry. With best regards Laslo
Re: [hackers] [tabbed][PATCH] Use utf8 for window name
In Wed, 10 Jun 2020 22:09:01 +0200 Hiltjo Posthuma wrote: > On Thu, Jun 04, 2020 at 02:13:49PM +0500, Nikita Zlobin wrote: > > At least some desktop tools (non-mainstream) are in trouble with > > tabbed window name. At the moment of try I have only tint2 and > > rofi. First just showes intitled, but second - "Invalid encoding". > > Though xfwm4 has no problem with compound text names. --- > > tabbed.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/tabbed.c b/tabbed.c > > index af207c8..4ee4277 100644 > > --- a/tabbed.c > > +++ b/tabbed.c > > @@ -1296,8 +1296,8 @@ xsettitle(Window w, const char *str) > > { > > XTextProperty xtp; > > > > - if (XmbTextListToTextProperty(dpy, (char **), 1, > > - XCompoundTextStyle, ) == Success) { > > + if (Xutf8TextListToTextProperty(dpy, (char **), 1, > > + XUTF8StringStyle, ) == Success) { > > XSetTextProperty(dpy, w, , wmatom[WMName]); > > XSetTextProperty(dpy, w, , XA_WM_NAME); > > XFree(xtp.value); > > -- > > 2.26.2 > > > > > > Hi, > > Just curious, whats your system locale? > > Can you show the output of `locale`? > One more reason to propose utf. I have read this to better understand Xft: https://keithp.com/~keithp/talks/xtc2001/paper It mentions, that Xft requires unicode. Not sure, what unicode type is meant, but at least Xft manual hs Utf(x) suffixed functions, though no with Ucs(x).
Re: [hackers] [tabbed][PATCH] Use utf8 for window name
In Wed, 10 Jun 2020 22:09:01 +0200 Hiltjo Posthuma wrote: > On Thu, Jun 04, 2020 at 02:13:49PM +0500, Nikita Zlobin wrote: > > At least some desktop tools (non-mainstream) are in trouble with > > tabbed window name. At the moment of try I have only tint2 and > > rofi. First just showes intitled, but second - "Invalid encoding". > > Though xfwm4 has no problem with compound text names. --- > > tabbed.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/tabbed.c b/tabbed.c > > index af207c8..4ee4277 100644 > > --- a/tabbed.c > > +++ b/tabbed.c > > @@ -1296,8 +1296,8 @@ xsettitle(Window w, const char *str) > > { > > XTextProperty xtp; > > > > - if (XmbTextListToTextProperty(dpy, (char **), 1, > > - XCompoundTextStyle, ) == Success) { > > + if (Xutf8TextListToTextProperty(dpy, (char **), 1, > > + XUTF8StringStyle, ) == Success) { > > XSetTextProperty(dpy, w, , wmatom[WMName]); > > XSetTextProperty(dpy, w, , XA_WM_NAME); > > XFree(xtp.value); > > -- > > 2.26.2 > > > > > > Hi, > > Just curious, whats your system locale? > > Can you show the output of `locale`? > $ locale LANG=ru_RU.utf8 LC_CTYPE="ru_RU.utf8" LC_NUMERIC=POSIX LC_TIME="ru_RU.utf8" LC_COLLATE="ru_RU.utf8" LC_MONETARY="ru_RU.utf8" LC_MESSAGES="ru_RU.utf8" LC_PAPER="ru_RU.utf8" LC_NAME="ru_RU.utf8" LC_ADDRESS="ru_RU.utf8" LC_TELEPHONE="ru_RU.utf8" LC_MEASUREMENT="ru_RU.utf8" LC_IDENTIFICATION="ru_RU.utf8" LC_ALL=
Re: [hackers] [tabbed][PATCH] Use utf8 for window name
On Thu, Jun 04, 2020 at 02:13:49PM +0500, Nikita Zlobin wrote: > At least some desktop tools (non-mainstream) are in trouble with tabbed > window name. > At the moment of try I have only tint2 and rofi. First just showes intitled, > but > second - "Invalid encoding". Though xfwm4 has no problem with compound text > names. > --- > tabbed.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tabbed.c b/tabbed.c > index af207c8..4ee4277 100644 > --- a/tabbed.c > +++ b/tabbed.c > @@ -1296,8 +1296,8 @@ xsettitle(Window w, const char *str) > { > XTextProperty xtp; > > - if (XmbTextListToTextProperty(dpy, (char **), 1, > - XCompoundTextStyle, ) == Success) { > + if (Xutf8TextListToTextProperty(dpy, (char **), 1, > + XUTF8StringStyle, ) == Success) { > XSetTextProperty(dpy, w, , wmatom[WMName]); > XSetTextProperty(dpy, w, , XA_WM_NAME); > XFree(xtp.value); > -- > 2.26.2 > > Hi, Just curious, whats your system locale? Can you show the output of `locale`? -- Kind regards, Hiltjo
[hackers] [tabbed][PATCH] Use utf8 for window name
At least some desktop tools (non-mainstream) are in trouble with tabbed window name. At the moment of try I have only tint2 and rofi. First just showes intitled, but second - "Invalid encoding". Though xfwm4 has no problem with compound text names. --- tabbed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tabbed.c b/tabbed.c index af207c8..4ee4277 100644 --- a/tabbed.c +++ b/tabbed.c @@ -1296,8 +1296,8 @@ xsettitle(Window w, const char *str) { XTextProperty xtp; - if (XmbTextListToTextProperty(dpy, (char **), 1, - XCompoundTextStyle, ) == Success) { + if (Xutf8TextListToTextProperty(dpy, (char **), 1, + XUTF8StringStyle, ) == Success) { XSetTextProperty(dpy, w, , wmatom[WMName]); XSetTextProperty(dpy, w, , XA_WM_NAME); XFree(xtp.value); -- 2.26.2
[hackers] [tabbed][PATCH] Use utf8 for window name
I noticed, that rofi window selector and tint2 panel can't display tabbed window name correctly, though no problem with e.g. xterm and urxvt. Strange :/ anyway, no more problem. From ec95771f2434b44a1d3e83135b95118a42fc78fe Mon Sep 17 00:00:00 2001 From: Nikita Zlobin Date: Thu, 4 Jun 2020 13:04:22 +0500 Subject: [tabbed][PATCH] Use utf8 for window name To: hackers@suckless.org At least some desktop tools (non-mainstream) are in trouble with tabbed window name. At the moment of try I have only tint2 and rofi. First just showes intitled, but second - "Invalid encoding". Though xfwm4 has no problem with compound text names. --- tabbed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tabbed.c b/tabbed.c index af207c8..4ee4277 100644 --- a/tabbed.c +++ b/tabbed.c @@ -1296,8 +1296,8 @@ xsettitle(Window w, const char *str) { XTextProperty xtp; - if (XmbTextListToTextProperty(dpy, (char **), 1, - XCompoundTextStyle, ) == Success) { + if (Xutf8TextListToTextProperty(dpy, (char **), 1, + XUTF8StringStyle, ) == Success) { XSetTextProperty(dpy, w, , wmatom[WMName]); XSetTextProperty(dpy, w, , XA_WM_NAME); XFree(xtp.value); -- 2.24.1 =