title: Asterisk AGI Encoding
body: <p>I’m using a publically available AGI Script that wraps Google’s Speech Recognition API for converting speech to text in Asterisk. Basically, the script passes an audio file do Google and returns the text recognized from the audio.</p>
  
  <p>This is working great, except for one deal breaking problem. Whenever the recognized text contains extended characters such as “á”, “ã”, “é”, etc., the dial plan gets a distorted string. For example, Google returns the text “não”, but ASTERISK gets “nÃ£o”. </p>
  
  <p>This, obviously, is related to the encoding… But I’m having trouble, due to limited knowledge in AGI and PEARL, determining where the problem. As far as I could determine, it could be</p>
  
  <p>GOOGLE -> PEARL or PEARL -> ASTERISK</p>
  
  <p>I hope someone can help me on this…</p>