WriteUTF() append junk characters to Bluetooth printer

Hi guys,
I am having problem sending printing to a portable bluetooth printer.
It always print out additional junk characters in front of the content.
Example:
KHello World
**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.
My Coding:
============
String url = "btspp://00099BC9BC98:1;authenticate=false;encrypt=false;master=false";
StreamConnection con = (StreamConnection) Connector.open( url );
DataOutputStream out = con.openDataOutputStream();
retStr = "Hello World"; //This is a message with english and chinese characters
out.writeUTF(retStr);
out.write(0x0A); //print & line feed
Thread.sleep(500);
out.flush();
out.close();
con.close();

*Don't post general Java questions here*

Similar Messages

  • Junk characters in output print. Is it related to User profile?

    Hi friends,
    My user generated Invoices using MRRL and generated output using MR90.
    Spool created for these invoices. But in the print, we are getting some lines with junk characters. It looks like chinese characters.
    1. If I see the Spool print preview, still I see the junk characters. That means there is no problem with printer. And it should be a problem either with Output triggering or MR_PRINT form.
    Important this is that, user facing this problem from yesterday only. Earlier to that everything was fine.
    Are there any chances of this problem due to User profile?
    In MIR4 transaction, in the Header output messages. I find in the Menu Edit -> Repeat output. But this is disabled for me. How to enable this?
    Thanks in advance.
    Regards,
    AK

    Lesson learned: Always go and check SPAD (devices) if you face any printer issues. My issue was because the Basis has changed some settings in SPAD for LOCL device

  • Printer has been setup in one server but it's printing Junk characters

    Printer has been setup in one server but it's printing Junk characters
    Pdf file's sent from server and from local machine are printing fine..But prints sent from Oracle Reports are not getting printed, instead it is printing some garbage contents.

    Forgot to mention it's  10gAS (10.1.2.3) forms & reports

  • Barcode related Template output Printing Junk characters  in XML Publisher

    Hi Gurus,
    Could you please help me out..
    I have a bar code related Template and registered to Concurrent Program(i.e. Report type as Executable) and i run the Program in PDF Output.
    I am using free "3 of 9 font" for Bar code in my template
    Problem Occurrence Procedure
    1) When i submit the Concurrent Program and Click the View Output Button
    2) the out put looks good with Bar code and Text in Table Format.
    3) when i assign a printer, while Concurrent Program Submission then the printer prints output with Junks Characters and no data in it.
    4) if i save the PDF Output file in Desktop and give print then it prints Good with barcode and text in Table Format.
    The main problem is when printer is assigned to the Concurrent Program while submission of Request then the Printer output is printing Junk Characters but through View Output Button in Request Window we get Barcode Output Good with data in it
    Could you please give me the Solution in Step by step Procedure
    It would be grateful to me..
    Thanks,
    Vijay

    Hi Schavali,
    Ours Database Server
    RDBMS : 10.2.0.4.0
    Oracle Applications : 11.5.10.2
    OS:- IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
    If you are using UTF8, direct PDF printing is not supported. Has the barcode font been installed ?
    i am using free 3 of 9 bacode font..
    Could you please give me the step by step procedure for printing the Output with barcode labels..
    Thanks,
    Viajy

  • Junk Characters are coming in the Print Preview of True Type Font

    Hi
    I am facing one issue. Here I have installed on one of the True type font of Gujarati (one of Regional language for India) language.When I see Print preview using LP01 Output device (which has SWIN Device Type) these true type font coming as Junk characters. But when I take print it is coming perfectly Ok. I want to know is there any setting required to maintain for Output device to see Print Preview in Gujarati also ?
    I feel that when System is generating output for Preview it is ignoring true type font..
    If there is any solution kindly let me know
    Regards
    Bhavin Shah

    Hi,
    Try creating the spool using the unicode device type SWINCF(see note #812821) and check the result.
    regards,
    Aidan

  • Print preview coming in junk characters

    Hello All,
    Can some tell me when I execute me23n and I want to print the PO details, when I go for print preview, i get a print preview in junk characters, none of the characters is readable, whereas when other person tries to see the same he gets correct display of characters.
    Could any one of you let me know Am I missing some setting.
    Thanks,
    Mark

    Hello -
    The print preview is done by the GUI, which is a Windows application. That the GUI can display a special font, there are two requirements:
    - You must install a True Type Font in Windows, which contains a MICR
      font (that the GUI can use the font to display the characters).
    - You must tell the SAP the name of the Windows font. This
      can be done via transaction SE73 -> Font Families, button
      'RTF font info'. Note #130658 describes, what you have to enter here.
    Regards.

  • Junk Characters on first two pages of Cheque Printing SAP Script.

    Hi All
    I implementing cheque printing for one of our client's Oman based subsidiary. I have copied the standard SAP Script F110_PRENUM_CHCK into a Z-Form and maintained its original language as EN. I have commented out all the unnecessary peices of information in all the windows and customised as per my requirement.
    Now the problem that i am facing is that when i execute this script through the standard driver program RFFOUS_C, i am getting junk characters on first two pages of the script. The info displayed comes in the HEADER and MAIN Windows. The desired output is coming in the 3rd, 4th and 5th pages.
    Please let me know how should i get rid of these junk characters.
    Regards
    Harsh
    PS: All info printed is in English only.

    Hi
    Thanks for your response.
    Yes, the remittance advice header info is getting printed in the HEADER Window and its contents in the tabular structure are in the MAIN Window.
    I am passing EN as the language.
    Adding to this, the report RFFOUS_C gets executed and i am checking the spool that is created which has the junk characters on the first two pages.
    Regards
    Harsh

  • Junk characters printed

    I am trying to print a tamil font through sapscript. I am able to see the same output if I print from word but from SAP i am getting junk characters. What could be the reason?? I have done all the relevant settings also/
    Thanks
    Narayani

    Have you got the same text in SAP as a tiff file and are you using the include text format to print the same?
    Is it something like logo printing -
    Try these steps which we normally use to print logo in SAP.
    SAP SCRIPT LOGO PRINTING
    To Create a logo in SAP printouts , just do the following
    1. Save a Logo using Paintshop Pro or Corel Draw as Tiff file.
    2. Run this program RSTXLDMC and enter the following parameters
       Enter file name                     C:\MAIL\COMPLOGO.TIF
       UOM                           CM
        Line width for text                132
        Text name                     ZHEX-MACRO-COMPLOGO
        Text ID                          ST
        Text language = E
        Number of Tiff gray levels (2,4,9) 2
    3.  Then Create a new window 'COMP' with attributes;
         Window COMP description Company Logo
         Left margin 7.00 CH window width 10.00 CH
        Upper margin LN window height 8.00 LN
    Finally in the text element , mention
            /: INCLUDE 'ZHEX-MACRO-COMPLOGO' OBJECT TEXT ID ST LANGUAGE 'E'.
    Please note that if object name is not indicated as 'ZHEX...', the logo may not be printed!
    You will not be able to see the logo in a test print. The same will be printed in actual printout.
    Message was edited by: Ashish Gundawar

  • Junk characters like" � � "displayed in the jsp page please help.

    Hi,
    I am getting junk characters like � � displayed in the jsp page.
    In the JSP page i used javascript "& nbsp" for appending spaces to a string "CCR" to get "CCR " .
    Now the Resultant string "CCR " has three spaces appended to its right.
    This String is set in session in that JSP page.
    In the next JSP page i am getting that string from session.
    After getting the string the "substring" function is performed to get only the first 5 charcters of the string. Now the result is displayed as " CCR� � " with has last 2 characters as junk values � � insteed of displaying as "CCR ". Please help me in solving this issue.
    Please note that initially the sting "CCR" is got from the Oracle database in Solaris Machine.
    Regards,
    Vijay

    have you tried:
    strenuously inspecting the string that is coming from the db? do an actual loop over the string, character by character, dumping to System.out to make sure the characters are EXACT coming out of the db.
    note you have to append " " not just "& nbsp"
    post the code that is doing the output. the relevant bean code, the jsp, everything relevant - WITH COMMENTS discussing where things are happening.
    Also, is it "weird characters" in the browser only? have you done a view source on the actual html source that the browser is rendering (right click in IE and click view source). browsers can act odd if you don't feed then exactly what they want, and it looks like you're feeding it escaped characters that it is rendering as something else.

  • Report Output in text giving junk characters

    Hi All
    I have created custom report in rdf file format. When running the report set output as PDF means its come good. Incase i will change report output as text means its shows lot of junk characters in output time .
    How can i will solve the issue
    Sample Text Output :
    (s7BTAN CHONG MOTOR ASSEMBLIES S(s0B
    <-(s7BNo: 249, Jalan Segambut, 51200 Kuala <-(s0B
    <-(s7BSTATEMENT OF ACC(s0B
    <-(s7BAS ON(s0B (s7B16-APR-13<-(s0B
    <-(s7BSupplier (s0BAFM MART SDN BHD <-(s7BSupplier Account N<-(s0B
    NO 6 JALAN SS 4C/5
    TAMAN RASA SAYANG
    TAMAN RASA SAYANG
    PETALING JAYA
    PETALING JAYA
    SELANGOR
    Malaysia-47301
    03-78048099 Document Cur Base Curr
    Docume Curre --------- ---------------
    nt Ref Num Doc T Tranx Due D !CurRa Deb Cred Deb Cred Balan
    (s7BOpen I(s0B
    *****TESTINGABC STD INV ***********MYR 456 456 456
    *****TESTING123 STD INV ***********MYR 1000 1000 1000
    (s7BTotal Pa<-(s0B (s7B0(s0B (s7B1456(s0B (s7B1456(s0B
    (s7BTotal Outstandin(s0B (s7BCurrent(s0B (s7B31 - 60 Days(s0B (s7B61 - 90 Days(s0B (s7BAbove 90 D(s0B
    (s7B1456(s0B (s7B0(s0B (s7B0(s0B (s7B0(s0B (s7B0(s0B
    Edited by: 993525 on Apr 16, 2013 10:25 AM

    Hi
    What is your database/application characterset? - AL32UTF8
    NLS_LANG : AMERICAN_AMERICA.WE8ISO8859P1
    concurrent request log file
    -------------------+
    XXTC Custom: Version : UNKNOWN
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    XXTCM_SUPPLIER_SOA module: XXTC Supplier Statement
    Current system time is 16-APR-2013 10:40:18
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    Arguments
    P_VENDOR_NUM_FROM='2'
    P_VENDOR_NUM_TO='2'
    P_INVOICE_DATE_TO='2013/04/16 00:00:00'
    APPLLCSP Environment Variable set to :
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    AMERICAN_MALAYSIA.AL32UTF8
    Enter Password:
    Report Builder: Release 10.1.2.3.0 - Production on Tue Apr 16 10:40:19 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Output file size:
    446
    ------------- 1) PRINT   -------------
    Printing output file.
    Request ID : 607096      
    Number of copies : 0      
    Printer : noprint
    Finished executing request completion options.
    Concurrent request completed successfully
    Current system time is 16-APR-2013 10:40:20
    Thanks Sanjay
    Edited by: 993525 on Apr 16, 2013 11:38 AM

  • Report displaying junk characters or Greek or some other language

    Hi All,
    I have one Custom report in PDF. It is a simple tabular report. When I run this report from Report Builder, it runs fine but when I register it in Oracle Apps and run it from there, it displays all the characters in Greek or some other language or junk characters. Sometimes it works if I change font. But its a trial and error. I dont understand why is it happening. This has happened with one of my other reports too. It worked when I changed the font and its size. This time it didnt work. Any clue how can I fix this issue?
    Any lead will be appreciated.
    Thanks,
    CAH
    Edited by: user638181 on Sep 3, 2009 7:05 AM

    Hi Hussein,
    We have similiar issue with our custom PDF reports. We are in the process of upgrading from 11.5.9 to R12.
    All these reports work fine in 11.5.9.
    Following are the details of our R12 environment:
    1) What is the application release? Application release is 12.1.1
    2) What is application/database characterset? Database - 11.1.0.7.0 and characterset is UTF8.
    3) Is this a text or bitmap report? What is the report language? - It is a text report and Language is English
    4) Do you use PASTA for printing? - Yes we do
    5) Do you get the correct printout if you print the concurrent request output file from the OS? - If I run the report from report builder directly, Yes. If from Oracle Apps, no.
    6) Expected output: "Days in Queue"
    Actual Output: when I copy and paste the output here it is showing correct. But on the report it is showing
    something like ∆Ωµ.....
    7) If I try changing the font, it works
    8) A different text field on the same report with the same font shows good.
    I would appreciate your help on this one.
    Thanks
    Vishnu

  • PDF is converting the Thai Language characters into Junk Characters

    Hi,
    While converting the SAP Script form to PDF, it is converting the Thai Language characters into Junk Characters. But it is showing correctly if we issue it to a printer. Also it is showing correctly in print preview.
    Urgent Help is needed.
    Thanks,
    srini.

    Cross post:
    Re: PDF is converting the Thai Language characters into Junk Characters

  • Junk characters using form MR_PRINT

    Hi friends,
    My user generated Invoices using MRRL and generated output using MR90.
    Spool created for these invoices. But in the print, we are getting some lines with junk characters. It looks like chinese characters.
    1. If I see the Spool print preview, still I see the junk characters. That means there is no problem with printer. And it should be a problem either with Output triggering or MR_PRINT form.
    Another point is that, user facing this problem from yesterday only. Earlier to that everything was fine.
    1. Did anyone face this problem?
    2. How can I repeat output in MIR4 to test it again?
    Thanks in advance.
    Regards,
    AK

    Hello
    Regarding SAPLPD it will only be supported for frontend printing in Releases < 4.6C. For all other Releases, please note the
    following:
    For frontend printing, customers should use access method 'G' instead of access method 'F'. See note 821519 for
    more details.
    For server-based printing via access method 'S' or 'U', customers should use SAPSprint instead of SAPLPD. Note
    894444 has all the details. This is valid for ALL Releases.
    For non-latin characters and Unicode use the details as per note 812821.
    Best regards.

  • Junk Characters in file

    Hi Experts,
    I am using  GUI_DOWNLOAD to download a file on my local server, In debugging the file seems to be having perfect data but once the file gets
    downloaded it shows certain junk characters in the file.

    Hi Frederic,
    Thanks for the reply, I have seen the file in latest editor as well. It still shoes the junk characters.
    I am using the below mentioned code.
    {code}
    CALL FUNCTION 'GUI_DOWNLOAD'
             EXPORTING
    *     BIN_FILESIZE                    =
               FILENAME                        = FILE
               FILETYPE                        = 'ASC'
               APPEND                          = 'X'
    *     WRITE_FIELD_SEPARATOR           = ' '
    *     HEADER                          = '00'
    *     TRUNC_TRAILING_BLANKS           = ' '
    *     WRITE_LF                        = 'X'
    *     COL_SELECT                      = ' '
    *     COL_SELECT_MASK                 = ' '
    *     DAT_MODE                        = ' '
    *     CONFIRM_OVERWRITE               = ' '
    *     NO_AUTH_CHECK                   = ' '
               CODEPAGE                        = '4110'
    *     IGNORE_CERR                     = ABAP_TRUE
    *     REPLACEMENT                     = '#'
    *     WRITE_BOM                       = ' '
    *     TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *     WK1_N_FORMAT                    = ' '
    *     WK1_N_SIZE                      = ' '
    *     WK1_T_FORMAT                    = ' '
    *     WK1_T_SIZE                      = ' '
    *     WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *     SHOW_TRANSFER_STATUS            = ABAP_TRUE
    *     VIRUS_SCAN_PROFILE              = '/SCET/GUI_DOWNLOAD'
    *   IMPORTING
    *     FILELENGTH                      =
             TABLES
               DATA_TAB                        = IT_FINAL
    *     FIELDNAMES                      =
            EXCEPTIONS
              FILE_WRITE_ERROR                = 1
              NO_BATCH                        = 2
              GUI_REFUSE_FILETRANSFER         = 3
              INVALID_TYPE                    = 4
              NO_AUTHORITY                    = 5
              UNKNOWN_ERROR                   = 6
              HEADER_NOT_ALLOWED              = 7
              SEPARATOR_NOT_ALLOWED           = 8
              FILESIZE_NOT_ALLOWED            = 9
              HEADER_TOO_LONG                 = 10
              DP_ERROR_CREATE                 = 11
              DP_ERROR_SEND                   = 12
              DP_ERROR_WRITE                  = 13
              UNKNOWN_DP_ERROR                = 14
              ACCESS_DENIED                   = 15
              DP_OUT_OF_MEMORY                = 16
              DISK_FULL                       = 17
              DP_TIMEOUT                      = 18
              FILE_NOT_FOUND                  = 19
              DATAPROVIDER_EXCEPTION          = 20
              CONTROL_FLUSH_ERROR             = 21
              OTHERS                          = 22
         IF SY-SUBRC <> 0.
    * Implement suitable error handling here
         ENDIF.
    {code}

  • Junk Characters in the Output of  Reports2.5

    I have created Report in Reports2.5 which is giving good output display
    But when I Register the Report in Oracle Apps & see output
    it shows Junk Characters in the place of Labels
    e.g. Revenue Report
    will come like sg0Revenue o7Report
    Can any-one give me the solution for this
    Regards / Shailesh ( [email protected] )

    This is probably due to the prt file that's being used to format the output. I'm willing to bet that the headings are in bold, and the prt file being used has includes some control characters to tell the printer to switch on and off bold - when you view the output file those are the characters you're seeing.
    To switch this off simply remove the control characters from the prt file being used.
    Hope this helps,
    Danny

Maybe you are looking for

  • How do you insert another PDF document into an existing PDF page

    Here's some background.  I used to use Acrobat 5 (I know it's really old but it worked great for my needs, but it's time to upgrade).  Say I have an existing 1 page PDF document (an Invoice for example).  Sometimes in Excel I create additional suppor

  • Custom Push button on CAT2 t-code

    Hi Experts, There is a requirement in my project, where we need to add a custom push button in the application tool bar of CAT2 transaction.(This push button must be placed right next to the additional fields push button). When this push button is pr

  • Very Poor Support Service in UK

    I had to contact Support Services in the UK last Sunday, and I hope that no other Playbook user in the UK had to go through what I did. I have 3 faults on my Playbook, Dead Pixels, No GPS and Faulty Charging, I contacted Support and in a nutshell the

  • Mystery slot in my computer

    Ok..this is probably a dumb questions, but can anybody tell me what that slot is for at the left side of my MacBook Pro? There seems to be a slot that I can push in (beside headphone jack) but I have no idea what "goes there"...anyone want to help a

  • Can I play YouTube Video from Safari to Apple TV?

    Hi, I can play YouTube to my Apple TV from iPhone and iPad, but not Safari on my Mac? What Gives?