From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] iso-8559-1 to unicode
Date: Fri, 9 Jan 2004 11:38:24 -0500 [thread overview]
Message-ID: <E1AezeV-000OXA-Ah@t40.swtch.com> (raw)
In-Reply-To: Your message of "Fri, 09 Jan 2004 08:10:49." <c833a9754788589770125e331a74f505@mteege.de>
> I'm try to move my old textfiles from my unix servers
> to plan9 server. In doing so I have problems to convert
> iso-8559-1 to utf-8. First I try recode l1..u1 but the
> result files aren't correct for plan9. Then I try tcs
> from plan9 and the conversion is perfect.
>
> The problem is, that I need a the modification time
> unchanged. This is default in recode but tcs use create
> a new file.
>
> Is there any way to save the modification time without
> a lot of scripting?
cat >cvt <<EOF
#!/bin/rc
t=`{mtime $1}
tcs -f iso-8859-1 -t utf-8 < $1 >/tmp/a &&
mv $1 $1.old &&
mv /tmp/a $1 &&
touch -t $t(1) $1
EOF
next prev parent reply other threads:[~2004-01-09 16:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-09 8:10 Matthias Teege
2004-01-09 8:33 ` Scott Schwartz
2004-01-09 9:24 ` Matthias Teege
2004-01-09 14:34 ` David Presotto
2004-01-09 16:38 ` Russ Cox [this message]
2004-01-09 16:47 ` Scott Schwartz
2004-01-10 4:09 ` boyd, rounin
2004-01-10 5:45 ` Skip Tavakkolian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1AezeV-000OXA-Ah@t40.swtch.com \
--to=rsc@swtch.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).