[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] binary mode for strings?
From: |
Manuel Collado |
Subject: |
Re: [bug-gawk] binary mode for strings? |
Date: |
Wed, 2 May 2018 17:11:07 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
El 02/05/2018 a las 0:17, address@hidden escribió:
You may wish to consider using iconv along with gawk, and letting iconv
convert the data from CP1250 to UTF-8 or something else more suitable
for gawk on Linux.
The attached "filenc.awk" script can automate the conversion process.
Just add an '::encoding' suffix to the foreign input file arguments, and
they will be converted to the current locale before processing.
Petr Slansky <address@hidden> wrote:
$ awk -f demo1.awk test.txt
Price is 35.12� (EUR).
Price is 35.12 (EUR).
Change this to:
$ gawk -i filenc -f demo1.awk test.txt::cp1252
It works on my Windows10/Cygwin64 platform. And should work on Linux
platforms with iconv installed.
Hope this help. Regards.
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
filenc.awk
Description: Text document
- [bug-gawk] binary mode for strings?, Petr Slansky, 2018/05/01
- Re: [bug-gawk] binary mode for strings?, arnold, 2018/05/01
- Re: [bug-gawk] binary mode for strings?,
Manuel Collado <=
- Re: [bug-gawk] binary mode for strings?, Petr Slansky, 2018/05/06
- Re: [bug-gawk] binary mode for strings?, arnold, 2018/05/06
- Re: [bug-gawk] binary mode for strings?, Petr Slansky, 2018/05/06
- Re: [bug-gawk] binary mode for strings?, Petr Slansky, 2018/05/06
- Re: [bug-gawk] binary mode for strings?, Andrew J. Schorr, 2018/05/06
- Re: [bug-gawk] binary mode for strings?, arnold, 2018/05/06
Re: [bug-gawk] binary mode for strings?, Eli Zaretskii, 2018/05/01