Bug#820803: xterm: X resources parsed with locale settings

2016-05-30 Thread Philipp Marek
> > > > Configuration files should be parsed via the "C" locale, IMO - having 
> > > > to 
> > > > think about "," vs. "." in there is awkward.
> > 
> > faceSize is affected, too, BTW.
> > 
> > 
> > > As far as I can tell the conversion is done in
> > > https://cgit.freedesktop.org/xorg/lib/libXt/tree/src/Converters.c#n822
> > > which indeed depends on the locale.
> > > 
> > > But since there's no way to tell how many people depend on the current
> > > behaviour, and changing it would break their configuration...
> > Well, it can't be *that* many people - because it's not that likely that
> >  a) different locale settings apply, AND
> >  b) user wants to change one of the few configuration settings that
> > are affected, AND
> >  c) user figures out that "," (or whatever else) would be the answer.
> > 
> > So, IMO changing that would be safe enough.
> > 
> > 
> > If you disagree with me, then how about just keeping the current behaviour, 
> > but try to parse with the "C" locale too!?
> It's a little late for that (existing configurations would break if xterm
> switched to "C" locale for evaluating resources).
It's never too late.
And I guess the number of users that figured out "," is *really* small 
- put it in Changelog, and they'll figure out to use "." too.


> And unlike the workaround used for "menuLocale", it's too early in the
> initialization for it to be a good solution for xterm (because that
> would break other parts of the initialization).
> 
> Besides this, there's the scaleHeight resource with the same potential issue.
Yeah, right.
Same reasoning as above applies, though.


Well, just use strtof() instead of sscanf(), and it's "." for comma only.
The current behaviour is unusable if people come in with (potentially) 
differing locales.



Bug#820803: xterm: X resources parsed with locale settings

2016-05-28 Thread Thomas Dickey
On Wed, Apr 13, 2016 at 07:55:06AM +0200, Philipp Marek wrote:
> > > Configuration files should be parsed via the "C" locale, IMO - having to 
> > > think about "," vs. "." in there is awkward.
> 
> faceSize is affected, too, BTW.
> 
> 
> > As far as I can tell the conversion is done in
> > https://cgit.freedesktop.org/xorg/lib/libXt/tree/src/Converters.c#n822
> > which indeed depends on the locale.
> > 
> > But since there's no way to tell how many people depend on the current
> > behaviour, and changing it would break their configuration...
> Well, it can't be *that* many people - because it's not that likely that
>  a) different locale settings apply, AND
>  b) user wants to change one of the few configuration settings that
> are affected, AND
>  c) user figures out that "," (or whatever else) would be the answer.
> 
> So, IMO changing that would be safe enough.
> 
> 
> If you disagree with me, then how about just keeping the current behaviour, 
> but try to parse with the "C" locale too!?

It's a little late for that (existing configurations would break if xterm
switched to "C" locale for evaluating resources).

And unlike the workaround used for "menuLocale", it's too early in the
initialization for it to be a good solution for xterm (because that
would break other parts of the initialization).

Besides this, there's the scaleHeight resource with the same potential issue.

-- 
Thomas E. Dickey 
http://invisible-island.net
ftp://invisible-island.net


signature.asc
Description: Digital signature


Bug#820803: xterm: X resources parsed with locale settings

2016-04-12 Thread Philipp Marek
> > Configuration files should be parsed via the "C" locale, IMO - having to 
> > think about "," vs. "." in there is awkward.

faceSize is affected, too, BTW.


> As far as I can tell the conversion is done in
> https://cgit.freedesktop.org/xorg/lib/libXt/tree/src/Converters.c#n822
> which indeed depends on the locale.
> 
> But since there's no way to tell how many people depend on the current
> behaviour, and changing it would break their configuration...
Well, it can't be *that* many people - because it's not that likely that
 a) different locale settings apply, AND
 b) user wants to change one of the few configuration settings that
are affected, AND
 c) user figures out that "," (or whatever else) would be the answer.

So, IMO changing that would be safe enough.


If you disagree with me, then how about just keeping the current behaviour, 
but try to parse with the "C" locale too!?
In the worst case, use "faceSizeC" or other names? (Ugh.)



Bug#820803: xterm: X resources parsed with locale settings

2016-04-12 Thread Julien Cristau
On Tue, Apr 12, 2016 at 15:54:17 +0200, Ph. Marek wrote:

> Package: xterm
> Version: 324-1
> Severity: normal
> 
> Settings activated via ~/.Xresources are parsed locale-dependent.
> 
> I'm running LANG=de_AT.UTF-8; if I put
> 
> XTerm*scaleHeight: 1.3
> 
> in ~/.Xresources (and "xrdb -merge" it), it's ignored.
> The setting
> 
> XTerm*scaleHeight: 1,3
> 
> works, though.
> 
> Now, that won't work for long, as the /home directory is shared across 
> quite a few machines; and not all of them have locales installed, and not 
> on all of them I'm working with "de_AT", so on these the setting is invalid 
> again.
> 
> 
> Configuration files should be parsed via the "C" locale, IMO - having to 
> think about "," vs. "." in there is awkward.
> 
As far as I can tell the conversion is done in
https://cgit.freedesktop.org/xorg/lib/libXt/tree/src/Converters.c#n822
which indeed depends on the locale.

But since there's no way to tell how many people depend on the current
behaviour, and changing it would break their configuration...

Cheers,
Julien



Bug#820803: xterm: X resources parsed with locale settings

2016-04-12 Thread Ph. Marek
Package: xterm
Version: 324-1
Severity: normal

Settings activated via ~/.Xresources are parsed locale-dependent.

I'm running LANG=de_AT.UTF-8; if I put

XTerm*scaleHeight: 1.3

in ~/.Xresources (and "xrdb -merge" it), it's ignored.
The setting

XTerm*scaleHeight: 1,3

works, though.

Now, that won't work for long, as the /home directory is shared across 
quite a few machines; and not all of them have locales installed, and not 
on all of them I'm working with "de_AT", so on these the setting is invalid 
again.


Configuration files should be parsed via the "C" locale, IMO - having to 
think about "," vs. "." in there is awkward.


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages xterm depends on:
ii  libc6   2.22-5
ii  libfontconfig1  2.11.0-6.4
ii  libice6 2:1.0.9-1+b1
ii  libtinfo5   6.0+20160319-1
ii  libutempter01.1.6-3
ii  libx11-62:1.6.3-1
ii  libxaw7 2:1.0.13-1
ii  libxft2 2.3.2-1
ii  libxmu6 2:1.1.2-2
ii  libxpm4 1:3.5.11-1+b1
ii  libxt6  1:1.1.5-1
ii  xbitmaps1.1.1-2

Versions of packages xterm recommends:
ii  x11-utils  7.7+3

Versions of packages xterm suggests:
pn  xfonts-cyrillic  

-- no debconf information