Package: rpl
Version: 1.5.7-1
Severity: important

Dear Maintainer,

The program fails with a TypeError Exception when locale is undefined or set to 
C:

root@notus:~# touch /tmp/rpl_test ; LANG=C rpl 'a' 'b' /tmp/rpl_test
Replacing "a" with "b" (case sensitive) (partial words matched)
.Traceback (most recent call last):
  File "/usr/bin/rpl", line 314, in <module>
    main()
  File "/usr/bin/rpl", line 246, in main
    matches = blockrepl(f, o, regex, old_str, new_str, 1024)
  File "/usr/bin/rpl", line 97, in blockrepl
    outstream.write(tonext.encode(encoding=encoding, errors='ignore'))
TypeError: encode() argument 1 must be str, not None



root@notus:~# touch /tmp/rpl_test ; LANG=en_US rpl 'a' 'b' /tmp/rpl_test
Replacing "a" with "b" (case sensitive) (partial words matched)
.
A Total of 0 matches replaced in 1 file searched.


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

Kernel: Linux 4.9.5-guest (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages rpl depends on:
pn  python3:any  <none>

rpl recommends no packages.

rpl suggests no packages.

-- no debconf information

Reply via email to