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

David A Aitcheson david.aitcheson at gmail.com
Sat Nov 17 06:16:26 PST 2018


Tom,

I am still getting the character 260 warning. Just way way fewer than
before, like only three warnings and then a "fopen: No such file or
directory" statement that is leaving me clueless for now.

With the limited amount of hours per week that I run Xastir, it is an
annoyance that I can just live with.

Thank you for looking at this issue. I am still convinced it it is a
issue on my system with respect to display settings.

73
Dave
KB3EFS


On 11/17/18 1:16 AM, Tom Russo wrote:
> I just undid *part* of my recent commit.  I left the part that actually 
> fixed the warning, but undid a bit that changed the behavior of the "Station 
> Info" dialog.
>
> I discovered that after my last commit, the degree sign rendered strangely
> in the Station Info scrollable text widget --- rather than just be a degree
> sign, it rendered as A with a circumflex followed by a degree sign.  I was
> unable to fix the code in db.c to stop doing that --- the only time it was
> right was if LANG=C had been set before running Xastir; setting via
> set_to_C_locale before rendering the text and restoring afterward did the 
> wrong thing.
>
> When I took these calls out of db.c, I discovered that the station info
> dialog didn't show a degree sign at all, but also didn't spew the warning.
> This was actually how it was before I started hacking (i.e. it was already
> broken).
>
> Since I can't figure out how to fix it, I reverted to what was there earlier
> today.  
>
> So as of now, the warnings are gone and the map renders the degree symbol 
> correctly.  But the station info dialog is borken if LANG is not C (or empty),
> showing "Bearing to my station" as a number with no degree sign at all.
>
> If anyone else wants to hack on it, you'd have to look for the places where
> "station_data_fill_in" writes bearing data into si_text using XmTextInsert.
>
> Near as I can tell, if the si_text widget is created while locale is C, it's
> all good as far as the degree sign goes, but then other rendering of text
> in other languages may be busted.  it doesn't seem to be enough to change
> the locale while *writing* into that text widget if the locale wasn't C
> at the time the widget was created.
>
> At any rate, I'm giving up.  At least the warnings are gone and the map has
> the degree symbol rendered correctly irrespective of LANG setting.
>
> On Fri, Nov 16, 2018 at 10:30:40PM -0700, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
>> 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]
>>
>> _______________________________________________
>> Xastir mailing list
>> Xastir at lists.xastir.org
>> http://xastir.org/mailman/listinfo/xastir



More information about the Xastir mailing list