I am trying to produce a shar
file with contents kept in the clear text inside the shar-file. For the most of it things work fine, but today I met a fairly strange problem:
When I do shar -T test.tex > file.shar
on the one-liner file, encoded in UTF-8:
\chapter{Séries}
everything works fine, and when executing sh file.shar
the file is extracted fine and it is the same as before.
Adding a one line to it and turning the file into:
\chapter{Séries}
Séries de potências são essenciais no estudo das funções.
the same command produces a shar file that contains the text. But when we execute sh
(or unshar
, or change it into an executable file and execute it) it fails the MD5 check upon extraction:
$ sh file.shar
x - created lock directory _sh06764.
x - extracting test.tex (text)
test.tex: MD5 check failed
x - removed lock directory _sh06764.
and it produces a file that is recognized as ISO-8859 text and it has all accents messed up, as in:
\chapter{Séries}
S©ries de potências são essenciais no estudo das funções.
I know the manual says that you may have problems e-mailing files produced with the -T
flag, but this goes beyond mailing -- the file itself is corrupted.
Can anyone share a light on what is going on?
-M
) or binary (-B
) option ofshar
instead of the text (-T
) option for non-ASCII files.-T
option, "If you have files with non-ascii bytes or text that some mail handling programs do not like, you may find difficulties."-M
and-B
produce include the files in NON editable format (uuencoded)..shar
file? This seems to me like an meta.stackexchange.com/questions/66377/what-is-the-xy-problem