Saving with diffrent encoding?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • perspolis

    #1

    Saving with diffrent encoding?

    Hi all
    I want to save my c# files with unicode encoding.
    I have some choices in encoding like:
    1-Unicode-CodePage1200
    2-Unicode(UTF8 with singnaure)-CodePage 65001
    3-Unicode(UTF8 without singnaure)-CodePage 65001

    which encoding is better to use unicode?/?
    thanks in advance


  • Jon Skeet [C# MVP]

    #2
    Re: Saving with diffrent encoding?

    perspolis <rezarms@hotmai l.com> wrote:[color=blue]
    > I want to save my c# files with unicode encoding.
    > I have some choices in encoding like:
    > 1-Unicode-CodePage1200
    > 2-Unicode(UTF8 with singnaure)-CodePage 65001
    > 3-Unicode(UTF8 without singnaure)-CodePage 65001
    >
    > which encoding is better to use unicode?/?[/color]

    2) is good because it means that anything which understands byte-order
    marks will know it's UTF-8. It also means that all ASCII characters in
    your file still only take up one byte each.

    --
    Jon Skeet - <skeet@pobox.co m>
    http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
    If replying to the group, please do not mail me too

    Comment

    • Mihai N.

      #3
      Re: Saving with diffrent encoding?

      > I want to save my c# files with unicode encoding.[color=blue]
      > I have some choices in encoding like:
      > 1-Unicode-CodePage1200
      > 2-Unicode(UTF8 with singnaure)-CodePage 65001
      > 3-Unicode(UTF8 without singnaure)-CodePage 65001
      >
      > which encoding is better to use unicode?/?
      > thanks in advance[/color]
      When you say "my c# files", you mean the source files?

      In general the answer is "it depends"
      Here are some considerations: http://www.unicode.org/notes/tn12/

      --
      Mihai Nita [Microsoft MVP, Windows - SDK]
      Best internationalization practices, solving internationalization problems.

      ------------------------------------------
      Replace _year_ with _ to get the real email

      Comment

      Working...