non ascii characters in doc and manpage

Bug #2035973 reported by Terrance
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Triaged
Undecided
Unassigned

Bug Description

you are using all kinds of unicode characters in docs and examples.

it took me 2 hours of hopeless debugging to figure it out.

all these "‐"s you are using are not \x2d, but \xe2\x80\x90.

then the `netplan generate` keeps through errors about
```
Invalid YAML: inconsistent indentation:
```
on the next line.

e.g.

```
network:
renderer: networkd
vrfs:
  vrf1:
    table: 1
    interfaces:
      ‐ enp5s0
    routes:
      ‐ to: default
        via: 10.10.10.4
    routing‐policy:
      ‐ from: 10.10.10.42
```

is

```
00000000: 6e65 7477 6f72 6b3a 0a72 656e 6465 7265 network:.rendere
00000010: 723a 206e 6574 776f 726b 640a 7672 6673 r: networkd.vrfs
00000020: 3a0a 2020 7672 6631 3a0a 2020 2020 7461 :. vrf1:. ta
00000030: 626c 653a 2031 0a20 2020 2069 6e74 6572 ble: 1. inter
00000040: 6661 6365 733a 0a20 2020 2020 20e2 8090 faces:. ...
00000050: 2065 6e70 3573 300a 2020 2020 726f 7574 enp5s0. rout
00000060: 6573 3a0a 2020 2020 2020 e280 9020 746f es:. ... to
00000070: 3a20 6465 6661 756c 740a 2020 2020 2020 : default.
00000080: 2020 7669 613a 2031 302e 3130 2e31 302e via: 10.10.10.
00000090: 340a 2020 2020 726f 7574 696e 67e2 8090 4. routing...
000000a0: 706f 6c69 6379 3a0a 2020 2020 2020 e280 policy:. ..
000000b0: 9020 6672 6f6d 3a20 3130 2e31 302e 3130 . from: 10.10.10
```

for whatever's sake, PLEASE REPLACE THEM!

Terrance (terrance-hhh)
description: updated
description: updated
Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Hi,

Interesting, can you confirm if this happened only when you copied the example from the man page?

Our web docs and example files are all ASCII files and apparently work fine. But I can confirm that if I copy it from the (rendered) man page, the dash character is not ascii.

Changed in netplan:
status: New → Triaged
Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote (last edit ):

Ok, according to man-pages(7), we need to write \- in the man sources if we want the ascii dash.

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

It's impacting searches in the man page. Other man pages seem to escape the - (\-) everywhere.

tags: added: foundations-todo
Lukas Märdian (slyon)
tags: added: documentation
Revision history for this message
Terrance (terrance-hhh) wrote :

hmm, I see `/usr/share/man/man5/netplan.5.gz` is using unescaped `-`, and no extended characters. so it is **man** converting '\x2d' into '\xe2\x80\x90'.

Revision history for this message
Terrance (terrance-hhh) wrote :

**man** converts unescaped '-' in /usr/share/man/man1/man.1.gz, too!

```
$ echo cross‐references | xxd
00000000: 6372 6f73 73e2 8090 7265 6665 7265 6e63 cross...referenc
00000010: 6573 0a es.

```

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.