C# UTF-8 Files being misread as DOS?

C# UTF-8 Files being misread as DOS?

112
Power UserPower User
112

    Aug 14, 2005#1

    I'm outputting files from C# - which I'm new to. I'm using a StreamWriter (which is supposed to default to UTF-8 encoding).

    When I look at these files with UE 11.10 the guillemet characters are incorrectly rendered:
    <Persistence>«Unknown»</Persistence>

    If I use one of the conversions (such as UTF-8 to ASCII), they are rendered correctly:
    <Persistence>«Unknown»</Persistence>

    When I first open the file, the status bar shows DOS. Should it?
    Is it a rendering or an encoding problem?

    I've had a search of the forum but none of the UTF-8 posts seem to be directly relevant.

    Cheerz,
    Paolo

    PS: Some further testing shows UltraCompare will identify the files correctly as UTF-8 with correct rendering.
    There is no such thing as an inconsistently correct system...
    Therefore, aim for consistency; in the expectation of reaching correctness!

    6,681583
    Grand MasterGrand Master
    6,681583

      Aug 15, 2005#2

      Have you enabled Auto detect UTF-8 files at the general configuration page?

      Read in help of UltraEdit the chapter Unicode and UTF-8 Support for details.
      Best regards from an UC/UE/UES for Windows user from Austria

      112
      Power UserPower User
      112

        Aug 15, 2005#3

        Yes,

        That did it. Thanks Mofi! I had other UTF support enabled, but I must have accidentally unchecked it...

        Cheerz,
        Paolo
        There is no such thing as an inconsistently correct system...
        Therefore, aim for consistency; in the expectation of reaching correctness!