title: Converting wide char string to lowercase in C++
body: <p>How do I convert a wchar_t string from upper case to lower case in C++? </p>
  
  <p>The string contains a mixture of Japanese, Chinese, German and Greek characters.</p>
  
  <p>I thought about using towlower...</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/8h19t214%28VS.80%29.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/8h19t214%28VS.80%29.aspx</a></p>
  
  <p>.. but the documentation says that:</p>
  
  <blockquote>
    <p>The case conversion of towlower is locale-specific. Only the characters relevant to the current locale are changed in case.</p>
  </blockquote>
  
  <p>Edit: Maybe I should describe what I'm doing. I receive a Unicode search query from a user. It's originally in UTF-8 encoding, but I'm converting it to a widechar (I may be wrong on the wording). My debugger (VS2008) correctly shows the Japanese, German, etc characters in in the "variable quick watch". I need to go through another set of data in Unicode and find matches of the search string. While this is no problem for me to do when the search is case sensitive, it's more problematic to do it case insensitive. My (maybe naive) approach to solve the problem would be to convert all input data and output data to lower case and then compare it.</p>