[Xastir] constant warnings in term after update and ipv6 (updated) isn't broke

Tom Russo russo at bogodyn.org
Fri Nov 16 21:30:40 PST 2018


I believe I have fixed the annoying "character 260" warning, but need help
confirming that I haven't broken anything.

I pushed the change just now, so if you update and have your LANG set to 
en_US.UTF-8 (or whatever the appropriate UTF-8 US English locale is on your
system), this warning should be gone.  This I have confirmed myself.

What I can't confirm, though, is that the changes I made haven't broken the
newly added Greek language support.  I will need someone for whom it actually
worked before to check.  It has never worked for me, presumably because I do
not have the correct fonts set.

I did this by wrapping all the "draw_nice_string" calls in draw_symbol that 
could contain the degree symbol in set_to_C_locale/restore_from_C_locale
pairs.  This should keep the number of such locale changes to a minimum,
and should not break anything at all --- the degree symbol should be OK in
C locale, and I made sure not to wrap other text rendering in those pairs so
it shouldn't have changed any other languages' displays.

On Fri, Nov 16, 2018 at 05:02:53PM -0700, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> On Wed, Nov 14, 2018 at 03:03:34PM -0700, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> > FWIW, Character code (octal) 260  or hex char B0 is the degree symbol in
> > the extended ASCII character set, which is currently being output to the map 
> > using stuff like:
> >  xastir_snprintf(temp_my_course, sizeof(temp_my_course), "%.0f\xB0",
> >                 atof(temp1_my_course));
> > 
> > That is, we're writing the degree sign in the extended ASCII character set
> > directly to the string being blatted onto the map, and thereby *assuming*
> > the C locale.  Before the set_to_C_locale/restore_from_C_locale thing was
> > put in, we were basically always in C locale after a certain stage, and so this
> > Just Worked.  Now that we're only in C locale in specific portions of the code,
> > it's borken.
> > 
> > I can see a few ways of addressing it, but the easiest might be to hack in
> > set_to_C_locale/restore_from_C_locale around all of those snprintfs and 
> > CreateManagedWidget calls.
> > 
> > There are 21 places where character code \xB0 appears.  Two of those
> > are commented out.  Not all are for map rendering -- some are in creation
> > of configuration widgets.
> 
> Actually, this is not right.
> 
> The sprintfing of the string isn't where the problem is happening, it's when
> the string is actually drawn into the display, which happens in draw_symbols.c's
> "draw_nice_string", called by draw_symbol.
> 
> So the correct place (perhaps) for the set_to_C_locale would either be in
> draw_nice_string wrapping the calls to XDrawString (which would mean all map drawing of text would happen in C locale), or in draw_symbol wrapping the calls 
> to draw_nice_string only for the bits where it is drawing course and temperature
> data for the symbol.  One could also try to get away with simply putting
> the call to draw_symbol inside set_to/restore_from C locale, but I don't know
> if any other language-specific or locale-specific stuff would be broken by 
> doing that.
> 
> That still leaves some of the issues in main.c where the station config
> dialog is created, because that has a bunch of instances of the degree symbol
> in X calls --- but that could be handled by putting the whole block of those
> widget creation calls into C locale, too.
> 
> > Another approach would be to scribble the degree sign into the display (and
> > some X dialogs) without resorting to the ASCII character code, but that might
> > be tricky.  A couple years ago, someone accidentally changed \xB0 into 
> > UTF-8 encoded degree symbols and that broke map displays.  One would have
> > to come up with a way of displaying the degree symbol that did not depend on
> > the locale setting.
> > 
> > On Wed, Nov 14, 2018 at 01:35:17PM -0800, we recorded a bogon-computron collision of the <davidf4 at mindspring.com> flavor, containing:
> > > IPV6 is once again working for firenet so it must have been a temporary
> > > fluke..
> > > 
> > > Now the only issue is that lovely repeating character message.  And I can
> > > confirm that doing a
> > > 
> > > LANG="" xastir
> > > 
> > > Does not produce the error message...
> > > 
> > > 
> > > -----Original Message-----
> > > From: David Flood [mailto:davidf4 at mindspring.com]
> > > Sent: Wednesday, November 14, 2018 08:46
> > > To: 'Xastir - APRS client software discussion'
> > > Subject: RE: [Xastir] constant warnings in term after update and ipv6 might
> > > be partially broken again
> > > 
> > > IPV6 worked for rotate.aprs2.net but not firenet.aprs2.net...so it might
> > > have been something about IPV6 and the firenet pool of addresses...or it
> > > might be related to the interface order patches announced yesterday...I'll
> > > try the old version again and then git pull to update and try again.
> > > 
> > > I have a real world interruption this AM but should have some ATUs this
> > > afternoon to try things again.  And if I only try to fire up the firenet
> > > interface then any error message shouldn't scroll off since I won't be
> > > getting the character error with each new station received since a failed
> > > connection doesn't receive any data.
> > > 
> > > Dave
> > > KD7MYC
> > > 
> > > -----Original Message-----
> > > From: Xastir [mailto:xastir-bounces at lists.xastir.org] On Behalf Of Jason
> > > Godfrey
> > > Sent: Wednesday, November 14, 2018 08:11
> > > 
> > > Are you still having IPv6 issues? Was it not connecting at all if you have
> > > IPv6 enabled?
> > > 
> > > - Jason
> > > 
> > > On Sun, Nov 11, 2018 at 9:24 AM David Flood <davidf4 at mindspring.com> wrote:
> > > 
> > > > I also tried LOCALE="C"...same errors...
> > > >
> > > > My locale is set to en_US.utf8
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Xastir mailing list
> > > Xastir at lists.xastir.org
> > > http://xastir.org/mailman/listinfo/xastir
> > 
> > -- 
> > Tom Russo    KM5VY
> > Tijeras, NM  
> > 
> >  echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]
> > 
> > _______________________________________________
> > Xastir mailing list
> > Xastir at lists.xastir.org
> > http://xastir.org/mailman/listinfo/xastir
> 
> -- 
> Tom Russo    KM5VY
> Tijeras, NM  
> 
>  echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]

-- 
Tom Russo    KM5VY
Tijeras, NM  

 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]



More information about the Xastir mailing list