locked
How to ensure that all files are UTF-8 encoded in Visual Studio 2005? RRS feed

  • Question

  • User-1859992688 posted

    I am working on a ASP.Net website that contains (for now) only plain English. We are going to add localized content. What should I do to ensure that all existing and future files (html for ex.), created through VS2005, are UTF-8 encoded by default?

    Thanks in advance,
    Joannès
    http://www.peoplewords.com
     

    Monday, November 20, 2006 11:14 AM

All replies

  • User-503940700 posted

    Hi Joannes,

    You can use the request/responseEncoding and the fileEncoding attribute  in the configuration file (web.config or Page directive).

    <globalization
                requestEncoding="utf-8"
                responseEncoding="utf-8"  />

    See this link for details:

    http://support.microsoft.com/default.aspx/kb/893663

    Hope this helps,

    Vivek 

    Monday, November 20, 2006 1:35 PM
  • User-1859992688 posted

    I am already doing that but it does not solve the problem. The problem is "We are a team of developers, I want to enforce that anyone that credit/edit a file do it with the right encoding". This problem is not on the web client perspective but on the VS2005 configuration. For now, I haven't find a way to ensure that every newly created file gets encoded in UTF-8 for everyone (settings that would be shared through the SCM).

     Joannes
     

    Monday, November 20, 2006 1:43 PM
  • User-503940700 posted

    Joannes,

    I think you can achieve this by customizing your VS project template (or creating a new one) and sharing with all your developers. See these links for details:

    http://aspalliance.com/933

    http://msdn.microsoft.com/en-us/library/6db0hwky(VS.80).aspx

    HTH,

    Vivek

    Monday, November 20, 2006 1:54 PM