Package: htag
Version: 0.0.24-1.1
Severity: normal

When wrapping text from a tag containing characters with a width other
than 1 – for example, East Asian characters (“wide”) – the text wraps
incorrectly in the resulting output.

If the following tag is selected by Htag:

=====
己所不欲、勿施于人。 (What is undesirable to you, do not do to others.) —孔夫子 Confucius 
(551 BCE – 479 BCE)
=====

into the following template:

=====
-- 
 \    @64R@ |
  `\  @64R@ |
_o__) @64R@ |
Ben Finney
=====

the output that results is incorrectly wrapped:

=====
-- 
 \       己所不欲、勿施于人。 (What is undesirable to you, do not do to others.) |
  `\                                —孔夫子 Confucius (551 BCE – 479 BCE) |
_o__)                                                                  |
Ben Finney
=====

(I have attached the signature template and tag file used for this
example.)

Instead, the output should wrap correctly within the specified width
based on the defined width of each character. For example, this would
be correct:

=====
-- 
 \         己所不欲、勿施于人。 (What is undesirable to you, do not do |
  `\                 to others.) —孔夫子 Confucius (551 BCE – 479 BCE) |
_o__)                                                                  |
Ben Finney
=====

Please ensure the calculation of text width for line wrapping takes
into account the defined width of each character.

A Perl library which might be useful for this is ‘Unicode::LineBreak’,
from the Debian package ‘libunicode-linebreak-perl’.


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

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

Versions of packages htag depends on:
ii  perl  5.20.2-6

htag recommends no packages.

htag suggests no packages.

-- no debconf information

-- 
 \           “We have met the enemy and he is us.” —Walt Kelly, _Pogo_ |
  `\                                                        1971-04-22 |
_o__)                                                                  |
Ben Finney <b...@benfinney.id.au>
己所不欲、勿施于人。 (What is undesirable to you, do not do to others.) —孔夫子 Confucius 
(551 BCE – 479 BCE)
德不孤、必有鄰。 (The virtuous are not abandoned, they shall surely have neighbours.) 
—孔夫子 Confucius (551 BCE – 479 BCE)
學而不思則罔,思而不學則殆。 (To study and not think is a waste. To think and not study is 
dangerous.) —孔夫子 Confucius (551 BCE – 479 BCE)
-- 
 \    @64R@ |
  `\  @64R@ |
_o__) @64R@ |
Ben Finney

Attachment: signature.asc
Description: PGP signature

Reply via email to