Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kasper Dyrvig 246 posts 379 karma points
    Dec 18, 2014 @ 11:46
    Kasper Dyrvig
    0

    Partials encoding bug?

    I upgraded to 7.2.1 this morning. And now I'm migrating my old scripting files to partial views. In one particular file I have this odd situation:

    Code in old scription file:

    string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ";
    @alphabet

    Renders: ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ

    Code in new partial view file:

    string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ";
    @alphabet

    Renders: ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ

    As you can see the code is 100% the same but the results are quite different. But why? And how to make it right??

    Any suggestions are welcome :-)

  • Kasper Dyrvig 246 posts 379 karma points
    Dec 18, 2014 @ 12:01
    Kasper Dyrvig
    0

    I can add that there may be a difference (or bug?) in the encoding of the files... When opening the files in Notepad++ the encoding of the old file is "UTF-8". The new file is "UTF-8 without BOM" (whatever that is).

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Dec 18, 2014 @ 13:58
    Sebastiaan Janssen
    100

    Hi Kasper,

    We're in the process of fixing this issue, see: http://issues.umbraco.org/issue/U4-5981

  • Kasper Dyrvig 246 posts 379 karma points
    Dec 18, 2014 @ 21:39
    Kasper Dyrvig
    0

    Great :-) Then I'll be sure to upgrade when 7.2.2 is out.

    Thank you for your response!

  • Dmitriy Larionov 10 posts 30 karma points
    Jan 27, 2015 @ 09:48
    Dmitriy Larionov
    0

    I know temprary solution until we are waiting 7.2.2.:

    1) Use Notepad.exe (from Windows OS) to edit partial views - it always add BOM at begin of file, but it can't open by FTP and have many of disabilities.

    2) Use PSPad (http://www.pspad.com/). I use it to open and edit files by FTP. In PSPad you need to choose UTF-16 BE format at top menu, before saving file.

Please Sign in or register to post replies

Write your reply to:

Draft