Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Gawk FIELDWIDTH...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 2192 of 2234
Post > Topic >>

Gawk FIELDWIDTHS and multibyte characters

by Hermann Peifer <peifer@[EMAIL PROTECTED] > Mar 16, 2008 at 01:23 AM

Hi,

It looks to me that Gawk's FIELDWIDTHS extension is not aware of
multibyte characters, see my example below.

$ cat testdata
CDRegion              Commune             Site
SEV=E4stsverige         Hallands l=E4n        Kungsbacka
SESm=E5land med =F6arna   V=E4stra G=F6talands l=E4nG=F6teborg
SEKronoberg           Alvesta             Stenungsund

$ file testdata
testdata: UTF-8 Unicode text

$ awk 'BEGIN{FIELDWIDTHS =3D "2 20 20 20"}{print $4}' testdata
Site
  Kungsbacka
 l=E4nG=F6teborg
Stenungsund

Can someone confirm?

Hermann




 3 Posts in Topic:
Gawk FIELDWIDTHS and multibyte characters
Hermann Peifer <peifer  2008-03-16 01:23:38 
Re: Gawk FIELDWIDTHS and multibyte characters
=?ISO-8859-1?Q?J=FCrgen_K  2008-03-16 20:42:41 
Re: Gawk FIELDWIDTHS and multibyte characters
Hermann Peifer <peifer  2008-03-16 21:04:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun May 11 20:45:57 CDT 2008.