[minicom-Bugs][315744] -R option with non-latin interface issue

minicom-bugs at alioth.debian.org minicom-bugs at alioth.debian.org
Mon Jun 19 19:57:10 UTC 2017


minicom-Bugs item #315744 was changed at 2017-06-19 21:57 by Adam Lackorzynski
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=100031&aid=315744&group_id=30018

Status: Open
Priority: 3
Submitted By: Anton Karmanov (bergentroll-guest)
Assigned to: Nobody (None)
Summary: -R option with non-latin interface issue 
Category: localization
Group: None
Resolution: None


Initial Comment:
I am using ru_RU.utf-8 locale.

minicom works fine until I am using "-R utf-8" option. The R key affects not only on a tty output but also on all minicom interface and I do not get cyrillic letters e.g. " 
" +: I18n" instead of "ПАРАМЕТРЫ: I18n".

I tried also run minicom with english interface and it looks proper. 

Tried on 2.7.1.

----------------------------------------------------------------------

>Comment By: Adam Lackorzynski (al-guest)
Date: 2017-06-19 21:57

Message:
For me it looks like in the picture. If you say it's overlapping it looks like a bug? Yes, please show it, I'd like to see it.

Hmm, maybe we need to have both values valid, I had a 5 there initially too, so did work for me back then...

----------------------------------------------------------------------

Comment By: Matthias Wallnöfer (mwallnoefer-guest)
Date: 2017-06-19 21:55

Message:
In GUI editors (kate, gedit) they are not shown as overlapping - strange :|.

----------------------------------------------------------------------

Comment By: Matthias Wallnöfer (mwallnoefer-guest)
Date: 2017-06-19 21:52

Message:
This is an Ubuntu 16.04 LTS with glibc 2.23.

I have tried opening the source code in vim and nano under two different terminal emulators and the smileys are shown overlapping.

I may paste you a picture if it's unclear.

----------------------------------------------------------------------

Comment By: Adam Lackorzynski (al-guest)
Date: 2017-06-19 21:30

Message:
There is something strange with the smiley-line. For me the value is 10, which seems to be the right one as every of the 5 smileys takes 2 columns. Is a smiley displayed in one or two columns in your case? (and which glibc are you running?)


----------------------------------------------------------------------

Comment By: Matthias Wallnöfer (mwallnoefer-guest)
Date: 2017-06-19 21:09

Message:
Thanks, but now I face this issue:

$ LANG=en_US.utf8 /usr/local/bin/minicom 
0: mbswidth=14
1: mbswidth=15
2: mbswidth=30
3: mbswidth=24
4: mbswidth=25
5: mbswidth=14
6: mbswidth=5
minicom: minicom.c:1032: test_mbswidth: Zusicherung »mbswidth(e[i].s) == e[i]._mbswidth« nicht erfüllt.
Abgebrochen

Also reproducible with the locale de_DE.utf8:

LANG=de_DE.utf8 /usr/local/bin/minicom
0: mbswidth=14
1: mbswidth=15
2: mbswidth=30
3: mbswidth=24
4: mbswidth=25
5: mbswidth=14
6: mbswidth=5
minicom: minicom.c:1032: test_mbswidth: Zusicherung »mbswidth(e[i].s) == e[i]._mbswidth« nicht erfüllt.
Abgebrochen


----------------------------------------------------------------------

Comment By: Adam Lackorzynski (al-guest)
Date: 2017-06-19 00:21

Message:
Hi Matthias,

patch is (finally!) merged now.

Adam

----------------------------------------------------------------------

Comment By: Matthias Wallnöfer (mwallnoefer-guest)
Date: 2017-06-09 08:19

Message:
Hi Adam,

for the ru_RU locale I cannot say more about since I have not fully installed it.

But I would be very glad if my patch (first comment) could be merged into the repo. This one fixes the "-R" parameter to show the UI interface always in UTF-8, so that special characters get rendered correctly.

----------------------------------------------------------------------

Comment By: Adam Lackorzynski (al-guest)
Date: 2017-06-09 00:29

Message:
Hi,

I think the smiley string (last but one entry in the array) actually has a wrong value, and it should be 10. Strange the 5 seemed to have worked once. Does this fix the assertion? (It does for me now that I enabled it again...).

Adam

----------------------------------------------------------------------

Comment By: Matthias Wallnöfer (mwallnoefer-guest)
Date: 2017-06-02 21:00

Message:
Other possibility to better diagnose the problem (tested on my machine):
Comment out the `if (0)` on line 1030 of minicom.c / test_mbswidth(void) and recompile.

If the output is similar to this one there is something wrong with the locale (check for the correct LANG variable or reconfigure the locale, on Debian-like OS `sudo dpkg-reconfigure locales`):
> $ LANG=ru_RU.utf8 /usr/local/bin/minicom -v
> 0: mbswidth=0
> minicom: minicom.c:1032: test_mbswidth: Assertion > `mbswidth(e[i].s) == e[i]._mbswidth' failed.
> Abgebrochen

In this case I would retry with another UTF-8 locale like en_US.utf8 to see if it works:
> $ LANG=en_US.utf8 /usr/local/bin/minicom -v
> 0: mbswidth=14
> 1: mbswidth=15
> 2: mbswidth=30
> 3: mbswidth=24
> 4: mbswidth=25
> 5: mbswidth=14
> 6: mbswidth=5
> 7: mbswidth=10
> ...

----------------------------------------------------------------------

Comment By: Anton Karmanov (bergentroll-guest)
Date: 2017-06-01 14:58

Message:
Yes, it is do the thing.
Now minicom seems well.

----------------------------------------------------------------------

Comment By: Matthias Wallnöfer (mwallnoefer-guest)
Date: 2017-05-31 22:16

Message:
This is weird. This assertion should fail indifferently with my patch applied or not (look at minicom.c line 1151 where test_mbswidth() gets directly called by main()).

How does minicom behave if you comment out line 1151 and recompile?


----------------------------------------------------------------------

Comment By: Anton Karmanov (bergentroll-guest)
Date: 2017-05-30 12:25

Message:
Sorry, I am not too familiar with mercurial.

I cloned hg repo and applied your patch with
$ hg patch attachment.diff

But after make I tried to execute minicom and get:
minicom: minicom.c:1032: test_mbswidth: Assertion `mbswidth(e[i].s) == e[i]._mbswidth' failed.

----------------------------------------------------------------------

Comment By: Matthias Wallnöfer (mwallnoefer-guest)
Date: 2017-05-30 08:31

Message:
Please try my patch on the mailing list: http://lists.alioth.debian.org/pipermail/minicom-devel/attachments/20170424/07157220/attachment.diff

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=100031&aid=315744&group_id=30018



More information about the minicom-devel mailing list