Results 1 to 1 of 1
- 09-21-2010, 10:48 AM #1Member
- Join Date
- Dec 2009
- Rep Power
WriteUTF() add junk characters to Bluetooth printer
I am having problem sending printing to a portable bluetooth printer.
It always print out additional junk characters in front of the content.
**It should be display "Hello World" only. A random characters will be display in front of the content, for
this case is the letter "K". I google and search many forums but found nothing that can help me solve this
problem. I know WriteUTF() will add 2 bytes in front to my string. FYI. I previously use WriteChars() to print
english words but now need to use WriteUTF to print the Chinese words. Is there anyway to fix this? Any help
will be appreciated.
String url = "btspp://00099BC9BC98:1;authenticate=false;encrypt=false;ma ster=false";
StreamConnection con = (StreamConnection) Connector.open( url );
DataOutputStream out = con.openDataOutputStream();
retStr = "Hello World"; //This is a message with english and chinese characters
out.write(0x0A); //print & line feed
- By weber10 in forum CLDC and MIDPReplies: 0Last Post: 02-26-2009, 09:14 PM
- By JAVA_ER in forum Advanced JavaReplies: 2Last Post: 02-20-2009, 08:25 AM
- By shapez in forum New To JavaReplies: 0Last Post: 03-06-2008, 04:21 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 01-22-2008, 09:19 PM
- By for453 in forum Java 2DReplies: 0Last Post: 08-09-2007, 06:30 AM