title: Tool to convert code source from a codepage to UTF-8?
body: <p>I'm working on an open source project. The original project contains comments in russian and is using codepage 1251. I'm using codepage 1252 and the russian comments aren't displayed correctly in Visual Studio Express 2008, not nice but anyway I can't read russian. Someone using codepage 950 (traditional chinese) tried to compile the project and was unable to do it, because of the code page! Now it is really annoying.</p>
  
  <p>I think that using <a href="https://stackoverflow.com/questions/383681/globalizing-source-code">unicode (and more exactly UTF-8 with signature) as file format for the code source</a> is the way to go.</p>
  
  <p>Problem: how to convert the whole source code easily?</p>
  
  <p>I have already though about:</p>
  
  <ul>
  <li><p>Let Visual Studio save the source code as UTF-8. But: My computer is using codepage 1252 and I found no way to tell VS that the original code source is using codepage 1251 so that the conversion won't be correct. </p>
  
  <p><strong>Edit:</strong> As pointed by "LicenseQ" there is a way to open a single file in VS with another encoding: click Arrow near Open button in open dialog, chose "Open With" and then chose "Code Editor (with encoding)".</p></li>
  <li><p>Of course I could change the codepage of my computer for the time of the conversion. But it's a global setting in Windows and you need to reboot the computer so that I'm looking for a more friendly solution.</p></li>
  <li><p>I've found a tool called <a href="http://www.codeproject.com/KB/files/CodePage_File_Converter.aspx" rel="nofollow noreferrer">CodePageConverter</a> which do exactly what I need, but can't a do it as batch job.</p></li>
  </ul>
  
  <p>Does anyone know another tool (a command line tool would be perfect) to convert from a codepage to UTF-8?</p>
  
  <p><strong>Edit:</strong> As suggest by tkotitan seems <a href="http://www.gnu.org/software/libiconv/" rel="nofollow noreferrer">iconv</a> to be the solution I was looking for. There is a <a href="http://gnuwin32.sourceforge.net/packages/libiconv.htm" rel="nofollow noreferrer">windows version of iconv</a>. And now that I know the name of this tool, I was able to find <a href="https://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets">over posts on stackoverflow</a> dealing with analogous issues.</p>