PC Review


Reply
Thread Tools Rate Thread

convert NMEA bytes to string

 
 
PCH
Guest
Posts: n/a
 
      29th Aug 2004
I receive the input data from the port and store it in a byte array.

No problems with that.

When I try to convert the bytes to a string, it doesnt convert correctly.
It comes back with jumbled characters instead of clean text. The port data
is correct, because I will use a gps viewer app and it displays the correct
strings / input from the port...

code snippet:
byte[] aByte;

aByte = r.Input;

s=System.Text.Encoding.ASCII.GetString(aByte, 0, aByte.Length);

I've also tried other text encodings, but they all return "crap".

Thanks




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting bytes from a string Chris Leffer Microsoft VB .NET 5 20th Apr 2005 10:02 AM
first bytes of a string Dirk Reske Microsoft C# .NET 3 15th Mar 2004 09:24 PM
simple conversion string->bytes->string changes my data??? Jazper Microsoft C# .NET 5 11th Nov 2003 11:57 AM
HOWTO: convert string to 8-bit bytes and back dermot Microsoft VB .NET 4 7th Oct 2003 04:13 PM
Binary String to bytes and/or HEX-string? Kenneth Priisholm Microsoft Dot NET Framework 2 22nd Jul 2003 04:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:07 AM.