[Bug 238568] tar filenames encoding problem

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jun 14 21:50:11 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238568

            Bug ID: 238568
           Summary: tar filenames encoding problem
           Product: Base System
           Version: 11.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: aler at playground.ru

How to reproduce:

```
#!/bin/sh

rm -Rf d e
mkdir d
touch d/`printf '\306'`
mkdir e
tar -c -f - d | tar -C e -x -f -
```

Doing this with empty $LANG leads to
```
: Can't translate pathname 'd/Ж' to UTF-8# sh test.sh 
```

However, directory `d` proprely copied into `e`.

This error message disappears with `LANG=en_US.ISO8859-1`

I'm not exactly sure what this error message means, but anyway it is very
unclear and may be interpreted as "the file was not archived".
Also I don't know why tar even tries to do some charset translations. It should
be binary-safe against filenames by default.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list