title: awk åäö umlaut-chars has length of 2
body: <p>I'm using awk (mac os x) to print only lines that are n characters and longer.</p>
  
  <p>If I try it on a text file (strings.txt) that looks like this:</p>
  
  <pre><code>four
  foo
  bar
  föö
  bår
  fo
  ba
  fö
  bå
  </code></pre>
  
  <p>And I run this awk script:</p>
  
  <pre><code>awk ' { if( length($0) &gt;= 3 ) print $0 } ' &lt;strings.txt 
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>four
  foo
  bar
  föö
  bår
  fö
  bå
  </code></pre>
  
  <p>(The last two lines should not have been printed). It seems like words that contain umlaut-characters (å, ä, ö...) count as two characters.</p>
  
  <p>(The input file is saved in UTF8 format.)</p>