text: Title: print_ctrl_ids with unicode
  Body: I am using python 3.6.4 and pywinauto 0.6.5 with Google Earth Pro 7.3.2.5491.  All are in 64-bit code versions.  There are some recently updates in Google Earth Pro which caused print_ctrl_ids generating unicodes (such as '\u200b') and errors when writing to a file (but not on the screen).
  1.  Any suggestions to deal with this issue.  Doing some searching, I notice that this issue (print_ctlr_ids with unicodes) was brought up in very late 2016 but don't know if this is the same or not.
  2.  Is there an option in print_ctrl_ids to save to a string variable instead of to a file to avoid this problem and be more flexible.
  
  Thank for all the support and maintenance for a very useful software, pywinauto.
  
  bbnluu
  
  Capturing of errors
  ==================================================================
  Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import os
  >>> from pywinauto import Application, keyboard, mouse
  >>> kmlfn = os.path.abspath('rcglic.kml')
  >>> os.startfile(kmlfn)
  >>> app = Application(backend='uia').connect(path='googleearth.exe')
  >>> dlg = app['Google Earth']
  >>> dlg.maximize()
  <uiawrapper.UIAWrapper - 'Google Earth Pro', Dialog, 3713040690716585331>
  >>> dlg.print_ctrl_ids(filename='tmpids.txt')
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "C:\Users\Brian\AppData\Local\Programs\Python\Python36\lib\site-packages\pywinauto\application.py", line 668, in print_control_identifiers
      print_identifiers([this_ctrl, ], log_func=log_func)
    File "C:\Users\Brian\AppData\Local\Programs\Python\Python36\lib\site-packages\pywinauto\application.py", line 657, in print_identifiers
      print_identifiers(ctrl.children(), current_depth + 1, log_func)
    File "C:\Users\Brian\AppData\Local\Programs\Python\Python36\lib\site-packages\pywinauto\application.py", line 657, in print_identifiers
      print_identifiers(ctrl.children(), current_depth + 1, log_func)
    File "C:\Users\Brian\AppData\Local\Programs\Python\Python36\lib\site-packages\pywinauto\application.py", line 657, in print_identifiers
      print_identifiers(ctrl.children(), current_depth + 1, log_func)
    [Previous line repeated 6 more times]
    File "C:\Users\Brian\AppData\Local\Programs\Python\Python36\lib\site-packages\pywinauto\application.py", line 653, in print_identifiers
      log_func(output)
    File "C:\Users\Brian\AppData\Local\Programs\Python\Python36\lib\site-packages\pywinauto\application.py", line 666, in log_func
      log_file.write(str(msg) + os.linesep)
    File "C:\Users\Brian\AppData\Local\Programs\Python\Python36\lib\encodings\cp1252.py", line 19, in encode
      return codecs.charmap_encode(input,self.errors,encoding_table)[0]
  UnicodeEncodeError: 'charmap' codec can't encode character '\u200b' in position 114: character maps to <undefined>
  >>>
  ==================================================================