| | |
Byte to string issue
![]() |
•
•
Join Date: Jul 2009
Posts: 8
Reputation:
Solved Threads: 0
I need to convert a byte array to a string, and it's working perfectly except for a few values.
Instead of adding the value 8D to the string, it adds the value 3F.
Any ideas why this doesn't work? So far it works for every value excluding 8D (01, CC, FF for example all work).
Java Syntax (Toggle Plain Text)
byte[] b = {(byte)0x8D}; String s = new String(b);
Instead of adding the value 8D to the string, it adds the value 3F.
Any ideas why this doesn't work? So far it works for every value excluding 8D (01, CC, FF for example all work).
![]() |
Similar Threads
- Convert byte Array to string + VB 6.0 (Visual Basic 4 / 5 / 6)
- String Issue :( (C++)
- newbie: how do I test a byte string? (Python)
- Extracting strings from a multi-byte string (Visual Basic 4 / 5 / 6)
- I need urgent help about getting n.th byte of a string to integer (C++)
- What to do if the string entered exceeds the specified size (C)
- why can't you use a switch statment with a string? (C++)
Other Threads in the Java Forum
- Previous Thread: run j2me programs on ubuntu x64
- Next Thread: drawing rectangle based on combo box values
| Thread Tools | Search this Thread |
911 addball addressbook android api append applet application apps array arrays automation binary bluetooth businessintelligence button card chat class client code collision component crashcourse css csv database eclipse ee error fractal free game gis givemetehcodez graphics gui html ide image integer integration j2me japplet java javaarraylist javadoc javafx javaprojects jni jpanel julia jvm linux list loan machine map method methods migrate mobile netbeans newbie objects oriented output panel phone physics problem program programming project projects radio recursion replaydirector reporting scanner se server service set sms socket software sort sql string swing test textfield threads transfer tree trolltech ubuntu utility windows





