Re: Transmitting a 'char' array thru serial port in new C# 2005 Ex

Tech-Archive recommends: Fix windows errors by optimizing your registry



halukg <halukg@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> I found the current encoding is us-ascii with the following code:
> retval = com.Encoding.EncodingName.ToString();

Right, that makes sense.

> I dont know how to change this encoding to unicode or iso-8859. Could you
> please show me how to do this?

com.Encoding = new Encoding(28591);

will give you ISO-8859-1. However, I would still *strongly* recommend
that you don't try to use this to write binary data.

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



Relevant Pages

  • Re: Handheld Arabic Printing
    ... My printer does print Arabic(it print arabic with the self test print) ... you are right i must convert the unicode to its encoding ... Prev by Date: ...
    (microsoft.public.dotnet.framework.compactframework)
  • Change default encoding
    ... how can I change default encoding for saving C# files?? ... I want to set it always to Unicode -CodePage1200. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C# and encodings
    ... different encoding than Unicode does (Unicode set uses three ... Any character encoding that is not Unicode by definition uses a different encoding than Unicode does. ... The point is that the Unicode "character" 0xfeff is not representable in any ANSI code page, and is treated specially by stripping it from input rather than replacing it with the "default character". ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Proposal: require 7-bit source strs
    ... If the application knows which encoding it is so it can convert at all, ... If you mean 'limited' to some other character set than Unicode, ... is that because you think of Unicode as The ... > standard grows with its adoption. ...
    (comp.lang.python)
  • Re: C# and encodings
    ... different encoding than Unicode does (Unicode set uses three ... encoding, and thus have only 255 code points matched to characters? ... But BOM should only be added when using one of Unicode encodings, ... at the beginning of a Unix script meaning ...
    (microsoft.public.dotnet.languages.csharp)