To make WebMatrix better, I suggest you ...

A menu option/status bar button to convert between encodings a la Notepad++

At least, between ISO-8859-1 and UTF-8, but every supported encoding by Windows is preferred

70 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    AldonioAldonio shared this idea  ·   ·  Admin →
    Under Review  ·  Simon TanSimon Tan responded  · 

    Interesting, let’s see how many others would use this feature!

    9 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • AshtonAshton commented  · 

        What works perfectly is being able to convert file line endings/breaks to Unix/Windows which can be done in other programs. I need this feature as Unix line endings are required for my work server.

        I am having to use 'Convert Line Delimiters To' in Eclipse to change windows line endings to Unix. Could this be implemented, or is there another work around?

      • Yishai Galatzer [WebMatrix developer]Yishai Galatzer [WebMatrix developer] commented  · 

        Exactly, I'm note sure though this will remove your extra new lines (but it might). Also note that on most Linux servers at default configuration PHP does not like to be written in UTF-8 so if you plan on publishing to a shared hosting provider this could cause issue.

        Cheers,
        Yishai

      • AshtonAshton commented  · 

        Would I set this to True? <EmitUtf8BomByDefault>False</EmitUtf8BomByDefault>

        <FileType extension=".php;.phtml">
        <OpenAs>PHP</OpenAs>
        <TabColor>Blue</TabColor>
        <Icon>PHPFileIcon</Icon>
        <EmitUtf8BomByDefault>False</EmitUtf8BomByDefault>
        <Description>A PHP File</Description>
        </FileType>

      • AshtonAshton commented  · 

        @Yishai Galatzer Thanks for the response. My may reason was to avoid unnecessary windows characters like new lines as this works best with my Unix/Linux server.

        I will use the example provided below, Thanks!

      • Yishai Galatzer [WebMatrix developer]Yishai Galatzer [WebMatrix developer] commented  · 

        @Ashton can you give us some more context. Most of the files are set to UTF-8, the ones that are not will auto detect that you have added non standard chars and will flip you to UTF-8 (or another codepage of your choice).

        This was made mostly to support non-IIS servers that don't deal so nicely with UTF-8 particularly for example on PHP files.

        Assuming the above explanation doesn't work out for your case you can always edit the following file:
        C:\Program Files (x86)\Microsoft WebMatrix\config\filetypes.xml

        For each file extension you can choose to go UTF-8 by default or not:

        See example below:
        <FileType extension=".txt;.text;">
        <OpenAs>Text</OpenAs>
        <TabColor>Gray</TabColor>
        <Icon>TextFileIcon</Icon>
        <EmitUtf8BomByDefault>False</EmitUtf8BomByDefault>
        <Description>A Plain Text File</Description>
        </FileType>

        Lastly we can of course consider this feature for our next release.

        Thanks for using WebMatrix!

        Yishai

      • AshtonAshton commented  · 

        I would like to be able to set the default to utf-8 thanks!

      • JarekJarek commented  · 

        I hope it will be more standards than ISO-8859-1? ;)

      • Yishai Galatzer [WebMatrix developer]Yishai Galatzer [WebMatrix developer] commented  · 

        This feature is implemented through the Save-As feature.

        On the bottom of the dialog you will see an encoding dropdown where you can pick your encoding.

      • RobertRobert commented  · 

        It's necessary! :)

      Feedback and Knowledge Base