none
How do i ensure that the files in my project is using UTF-8?

    Question

  • I have just started an "Webapp" in azure, based on the Flask template.

    If i add a comment in the python code(via MS VS 2015), with any special characters from Norway for example, then the website goes offline.

    The error message: "The page cannot be displayed because an internal server error has occurred."

    So therefore i ask: How do i ensure that my files stored from MS VS are using UTF-8?

    I have tried: Tools -> Options -> Environment -> Documents -> check "Save documents as Unicode when data cannot be saved in codepage". This made no changes to the error message.

    Thanks in advance.


    Sharepoint 2013 Office 365 Windows 7 (64bit)

    Sunday, February 26, 2017 6:05 PM

Answers

  • Hi patchie2,

    Please try below:

    edit the file, select File -> Advanced Save Options.  Change it to UTF-8 .

    Please let me know if it works.

    Best regards,

    Fletch


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by patchie2 Tuesday, February 28, 2017 6:28 PM
    Tuesday, February 28, 2017 2:35 AM

All replies

  • Hi patchie2,

    Please try below:

    edit the file, select File -> Advanced Save Options.  Change it to UTF-8 .

    Please let me know if it works.

    Best regards,

    Fletch


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by patchie2 Tuesday, February 28, 2017 6:28 PM
    Tuesday, February 28, 2017 2:35 AM
  • Hi patchie2,

    Please try below:

    edit the file, select File -> Advanced Save Options.  Change it to UTF-8 .

    Please let me know if it works.

    Best regards,

    Fletch


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    I also had to put in this code in the very top of the python file: 

    # -*- coding: utf-8 -*-


    Sharepoint 2013 Office 365 Windows 7 (64bit)

    Tuesday, February 28, 2017 6:29 PM