9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] iso-8559-1 to unicode
@ 2004-01-09  8:10 Matthias Teege
  2004-01-09  8:33 ` Scott Schwartz
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Matthias Teege @ 2004-01-09  8:10 UTC (permalink / raw)
  To: 9fans

Moin,

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?

Many thanks
Matthias


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] iso-8559-1 to unicode
  2004-01-09  8:10 [9fans] iso-8559-1 to unicode 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
  2 siblings, 1 reply; 8+ messages in thread
From: Scott Schwartz @ 2004-01-09  8:33 UTC (permalink / raw)
  To: 9fans

| iso-8559-1 to utf-8. First I try recode l1..u1 but the

Plan 9 uses utf-8.  "u1" should be "u8", if i read the info
file correctly.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] iso-8559-1 to unicode
  2004-01-09  8:33 ` Scott Schwartz
@ 2004-01-09  9:24   ` Matthias Teege
  0 siblings, 0 replies; 8+ messages in thread
From: Matthias Teege @ 2004-01-09  9:24 UTC (permalink / raw)
  To: 9fans

u8 is what I used. It was only a typo
in my last mail.
Matthias


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] iso-8559-1 to unicode
  2004-01-09  8:10 [9fans] iso-8559-1 to unicode Matthias Teege
  2004-01-09  8:33 ` Scott Schwartz
@ 2004-01-09 14:34 ` David Presotto
  2004-01-09 16:38 ` Russ Cox
  2 siblings, 0 replies; 8+ messages in thread
From: David Presotto @ 2004-01-09 14:34 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2 bytes --]

no

[-- Attachment #2: Type: message/rfc822, Size: 2591 bytes --]

From: Matthias Teege <matthias@mteege.de>
To: 9fans@cse.psu.edu
Subject: [9fans] iso-8559-1 to unicode
Date: Fri, 9 Jan 2004 08:10:49 0000
Message-ID: <c833a9754788589770125e331a74f505@mteege.de>

Moin,

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?

Many thanks
Matthias

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] iso-8559-1 to unicode
  2004-01-09  8:10 [9fans] iso-8559-1 to unicode Matthias Teege
  2004-01-09  8:33 ` Scott Schwartz
  2004-01-09 14:34 ` David Presotto
@ 2004-01-09 16:38 ` Russ Cox
  2004-01-09 16:47   ` Scott Schwartz
  2004-01-10  5:45   ` Skip Tavakkolian
  2 siblings, 2 replies; 8+ messages in thread
From: Russ Cox @ 2004-01-09 16:38 UTC (permalink / raw)
  To: 9fans

> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] iso-8559-1 to unicode
  2004-01-09 16:38 ` Russ Cox
@ 2004-01-09 16:47   ` Scott Schwartz
  2004-01-10  4:09     ` boyd, rounin
  2004-01-10  5:45   ` Skip Tavakkolian
  1 sibling, 1 reply; 8+ messages in thread
From: Scott Schwartz @ 2004-01-09 16:47 UTC (permalink / raw)
  To: 9fans

> tcs -f iso-8859-1 -t utf-8 < $1 >/tmp/a &&

Non-unique temp filenames are a painful thing.

a=`{mktemp}
tcs ... >$a &&



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] iso-8559-1 to unicode
  2004-01-09 16:47   ` Scott Schwartz
@ 2004-01-10  4:09     ` boyd, rounin
  0 siblings, 0 replies; 8+ messages in thread
From: boyd, rounin @ 2004-01-10  4:09 UTC (permalink / raw)
  To: 9fans

From: "Scott Schwartz" <schwartz@bio.cse.psu.edu>
>:..
> Non-unique temp filenames are a painful thing.

sissie



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] iso-8559-1 to unicode
  2004-01-09 16:38 ` Russ Cox
  2004-01-09 16:47   ` Scott Schwartz
@ 2004-01-10  5:45   ` Skip Tavakkolian
  1 sibling, 0 replies; 8+ messages in thread
From: Skip Tavakkolian @ 2004-01-10  5:45 UTC (permalink / raw)
  To: 9fans

> tcs -f iso-8859-1 -t utf-8 < $1 >/tmp/a &&

While we are on the subject, it appears that tcs has been ported to
other OS. What has it been tested on?



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-01-10  5:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-09  8:10 [9fans] iso-8559-1 to unicode 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
2004-01-09 16:47   ` Scott Schwartz
2004-01-10  4:09     ` boyd, rounin
2004-01-10  5:45   ` Skip Tavakkolian

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).