title: declare not a valid identifier bash
body: <p>I have a problem with my a bash script. What I do is assign variables like this.</p>
  
  <pre><code>   for ((i=START;i&lt;=END;i++)
  declare var$i=$(something)
  done
  </code></pre>
  
  <p>And it works, but now I have a problem with finnish characters like  å, ä, ö. What declare says is something like this </p>
  
  <pre><code>bash:declare 'wörd' not a valid identifier
  </code></pre>
  
  <p>Though it works fine if I do it like this</p>
  
  <pre><code>declare var2=$(sömething)
  </code></pre>
  
  <p>I can convert the characters with sed but it's better to have them like always, so this is a last resort solution.
  So I would like to know how can I assign variables like</p>
  
  <pre><code>var$i
  </code></pre>
  
  <p>with the finnish characters.
  The wörd word is part of the output of my command 'something'. When there are two words or more only the word(s) that contain the character ö , ä and so on are not assigned to the variable, so if the output of the command was "something wörd" then the only thing that is being shown with echo is something.</p>