two questions

two questions

am 05.09.2003 14:36:16 von pacho baratta

morning all.

i have 2 questions:

1° my cat -v is like this:
^@V^@e^@r^@i^@f^@y^@ ^@c^@o^@m^@p^@l^@e^@t^@e^@d^@
^@o^@n^@ ^@9^@/^@5^@/^@2^@0^@0^@3^@ ^@a^@t^@ ^@1^@:^@5^@3^@
^@A^@M^@.^@^M^@

i do i delete al this "^@" ?

2° i have a file in this format:
Little-endian UTF-16 Unicode English character data, with CRLF, CR line
terminators

how can i convert to simple ascii??

tnx, pacho


-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: two questions

am 05.09.2003 15:47:37 von Glynn Clements

pacho baratta wrote:

> 1° my cat -v is like this:
> ^@V^@e^@r^@i^@f^@y^@ ^@c^@o^@m^@p^@l^@e^@t^@e^@d^@
> ^@o^@n^@ ^@9^@/^@5^@/^@2^@0^@0^@3^@ ^@a^@t^@ ^@1^@:^@5^@3^@
> ^@A^@M^@.^@^M^@
>=20
> i do i delete al this "^@" ?
>=20
> 2° i have a file in this format:
> Little-endian UTF-16 Unicode English character data, with CRLF, CR li=
ne
> terminators
>=20
> how can i convert to simple ascii??

iconv -f UTF-16 -t UTF-8 oldfile > newfile
or:
iconv -f UTF-16 -t ASCII oldfile > newfile

If the source file only contains characters which can be represented
as ASCII (i.e. codes 0-127), there will be no difference between
converting to UTF-8 and converting to ASCII. OTOH, if the source file
contains any non-ASCII characters, converting to UTF-8 will succeed
while converting to ASCII will fail at the first non-ASCII character.

--=20
Glynn Clements
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html