How to Convert to Document with Encoding to GBK!

I get a String from SOCKET,eg:
<?xml version="1.0" encoding="GBK"?>
<YHPP ACTION="YHPP_SEND">
     <needReply/>
     <msgLevel>1</msgLevel>
     <serviceID>ECMY</serviceID>
     <msgFormat>15</msgFormat>
     <feeType>01</feeType>
     <feeCode>000010</feeCode>
     <validTime>0</validTime>
     <atTime>0</atTime>
     <srcTermID/>
     <destTermID/>
     <msgLen>70</msgLen>
     <msgContent>��������</msgContent>
     <msgID/>
     <msg_IDBM/>
     <feeUserType>3</feeUserType>
     <feeTerminalId/>
     <tpPid>0</tpPid>
     <tpUdhi>0</tpUdhi>
     <ipAddr>192.168.0.59</ipAddr>
</YHPP>
and I hava use org.w3c.dom.Document doc = javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(str.getBytes()));
this method to Convert to Document,but System print error
org.xml.sax.SAXParseException: Invalid encoding name "GBK".
? How to ??????????Help

Tell the people sending you that string to encode it in some other encoding. Or write your own little program to read it in and write it out in some other encoding before feeding it to the parser.

Similar Messages

  • How to create shipment document with out inbound delivery document

    Dear Friends
    How to create shipment document with out outbound/inbound delivery document.
    In my client scenario, there is no inbound delivery for normal purchases.
    Just there are raising the PO to vendor, then they are doing MIGO for goods receipt.
    Can we do shipment creation with reference to PO?
    If it is possible, how it will be?
    Please let it solve
    With regards
    Lakshmikanth

    Dear Sameer,
    Please go to transaction VT01N here you enter Transportation planning point and shipment type then press enter.
    Now system will take you to the shipment document creation screen here you click on Select deliveries or press F6 now system will take you to the select outbound deliveries screen in this screen you enter selection data then execute, now deliveries will get assigned to that shipment.
    After assigning the deliveries enter the remaining data then complete the shipment finally save the shipment document.
    For more information please go through this SAP help link
    Note:- Shipment process need to be carry out for the deliveries before PGI.
    http://help.sap.com/saphelp_47x200/helpdata/en/f5/04898047bd11d2bf750000e8a7386f/frameset.htm
    I hope this will help you,
    Regards,
    Murali.

  • How can i share documents with different users on the same mac?

    How can i share documents with different users on the same mac?

    Shared how? The other users can read the documents or you all can read and write the documents?
    The first is easy just place the documents in /Users/Shared anyone can access the files there and the other users will be able to read them.
    The second is a bit trickier.

  • I know that how to convert any documents to pdf file, but don't know how to get barcode on it. I am using windows 8.1. and want to see barcode on my documents before the print. Please help.

    I know that how to convert any documents to pdf file, but don't know how to get barcode on it. I am using windows 8.1. and want to see barcode on my documents before the print. Please help.

    Hi Frank ,
    Please refer to the following link and see if this helps.
    https://helpx.adobe.com/acrobat/kb/error-organizer-database-damaged-reset-1.html
    Regards
    Sukrit Dhingra

  • How to open iCloud documents with ios8

    hi,
    i recently updated my iPad to ios8. and when it asked me to install iCloud drive i said yes.
    Now when i open pages on my iPad, there are no documents.
    when i go to iCloud.com on my mac i can see those documents, so they still exist.
    how can i open my 'iCloud'  documents on pages on my iPad?
    most forums say i need to install the beta version of os yosemite, whom installation is not working those days.
    the only thing i can do was to open a document on iCloud.com on my mac and send it to me via email. from my iPad i could read that email and open the document in pages. But this work only with small documents, a document bigger than 20 Mo, cannot be sent via email ( i'm using gmail)
    please help me, i really need those documents, i'm working with them.
    thank you

    beckstarr wrote:
    Does anyone know how to open pages document with windows vista? i saved it onto a usb stick but when i tried to open it on the computers in my university which support windows vista, it didnt reconise the file and opened with a page of question marks!!!! Im panicking now!!!!!
    You cannot open it on Windows Vista. The only application in the world that opens a Pages document is Pages, and it is Mac OS X only.
    Your options:
    1. Find a Mac with Pages installed, and save the document as doc or pdf, which you can open on Vista.
    or, if that is impossible,
    2. Open the files in a texteditor like Notepad.exe on Windows and try to piece text fragments together to get at least part of your original text back. The images should also be available somewhere, even though all formatting is gone.

  • How to open pages documents with windows vista

    Does anyone know how to open pages document with windows vista? i saved it onto a usb stick but when i tried to open it on the computers in my university which support windows vista, it didnt reconise the file and opened with a page of question marks!!!! Im panicking now!!!!!
    Id appreciate any help!!! thanks!!!!!

    beckstarr wrote:
    Does anyone know how to open pages document with windows vista? i saved it onto a usb stick but when i tried to open it on the computers in my university which support windows vista, it didnt reconise the file and opened with a page of question marks!!!! Im panicking now!!!!!
    You cannot open it on Windows Vista. The only application in the world that opens a Pages document is Pages, and it is Mac OS X only.
    Your options:
    1. Find a Mac with Pages installed, and save the document as doc or pdf, which you can open on Vista.
    or, if that is impossible,
    2. Open the files in a texteditor like Notepad.exe on Windows and try to piece text fragments together to get at least part of your original text back. The images should also be available somewhere, even though all formatting is gone.

  • Can anybody tell how to compare two documents with two pointers controlled with the same mouse

    can anybody tell how to compare two documents with two pointers controlled with the same mouse ??

    I saw what I need but in a game to find the differences between two photos (two screens, two pointers controlled by one mouse), and I need a program to make the same thing   (compare a chosen files)

  • How to sign a document with certificate on USB key

    Hi everyone,
    I would like to know how to sign a document with a certificate on an USB key.
    Does anyone has already solve this problem ?
    Regards,
    Fred

    Hi Amitk,
    PDF is a commercial software which is not supported in MSDN forum. Maybe some forum talk about PDF is a better place to ask this question.
    I make a quick research on the web, and you may need to use some third party to sign a PDF document through DSC. Check this :
    http://stackoverflow.com/questions/378247/digitally-sign-pdf-files
    Hope this helps some.
    Shu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem converting Word document with TOC table

    Hello,
             I am using MsWord 2003 and Acrobat 9 in Windows 7 Ultimate 64 bits.
    I have created the manual using Word, I set Heading (s) with 3 levels deep and created TOC in Word.
    It looks as designed. There are Titles, Subtitles and Subtiles (3rd level).
    TOC in Word works fine. No problem.
    In PDFMaker options under Bookmarks tab I set TOC 1 with 3 levels.
    However, after converting the whole document into PDF, the Bookmarks look very strange.
    They contain only Titles (no subtitles at all), each bookmark line ends with some number 3, 4 or 5 which I do not have idea what are they and those bollmarks point to the TOC page not to the page they should have.
    What is wrong and how can I correct that?
    Thanks,
    jas
    Added:
    I have read many of posts having similiar problems and tried all the suggestions posted.
    I tried:
    1.
    Reinstalling Adobe (removing all the related files), although I did not have any previous versions (and installations) of Acrobat in this computer.
    2.
    In Adobe PDFMaker  uncheck 'Enable Accessibility and...' option
    3.
    Setting printer to Adobe PDF
    4.
    In Word > TOC settings I checked the 'Use hyperlinks instead of page numbers' option
    Also I tried In Adobe PDFMaker not use TOC but to use 'Convert Word Headings to Bookmarks'
    The result was horrible. Double bookmarks, reversed Level 1 with Level 2 positions and lots of empty bookmarks (I believe created by empty rows in pages tables).
    Please note, that using the same Headings Word creates TOC without any problems!
    The only plus side was that some of those bookmarks came with correct links.
    Those bokkmarks were created using 'New Bookmarks from structure' option in Acrobat (after converting the document)
    /jas

    This is ridiculous!
    I think it is time for Adobe to admit there is a problem creating bookmarks in Acrobat, regardless the used version.
    Today I spent all day trying different combinations.
    In addition to my post above I installed and tested the same document in Acrobat Prof ver.8 and Acrobat X.
    The installation was virgin (no previous Adobe was installed).
    Same for MS Office. Virgin installation of ver. 2003 and 2007
    My document I copied and pasted in blank new Word document.
    Also I tried under Windows XP
    All that does not make any difference.
    The final result was always the same, as shown graphically in above post.
    Any ideas?
    What I do not understand, how such big corporation allows bugs like that.
    Convertning TOC (nice working in Word) cannot be a rocket science!
    If Word can create TOC from Headings flawlessly, why not Adobe?
    That TOC is correctly converted as TOC page in pdf document.
    Maybe Adobe should add the option to create bookmarks directly from it after the conversion?!
    As I said, it is not a rocket science.
    Onus is on you, Adobe!
    /jas

  • Help converting pages document with images over to a 300 dpi jpg file

    Hi
    I'm pretty new to using Pages.  I have created a 4 page Pages document with a lot of iphoto images.  It's for a elementary school yearbook.  The publisher ulitmately needs a 300 dpi jpg file.
    How do I convert the pages document into a 300 dpi jpg?
    I tried to convert it first to a pdf then to a 300 dpi jpg but when I sent that file over, they said that when they zoomed in, the images all looked blurry.
    Any ideas on what to do without having to start all over again?  Worst case, I guess I can print out in best quality, scan and save as jpg but there's got to be an easier way.
    I'm not a graphic designer, just trying to fuddle my way through so you'll have to go easy on me with the techno speak.  Any cliff notes for mac beginners?
    Thanks much in advance for any help!

    The conversion isn't perfect between Pages and Word. The same font is handle differently in the two applications and so are many other things too. If you are concerned about how it looks use Pdf versions instead.

  • Please help; how to write XML document with JSP?

    I try to write XML document with JSP...
    But I got wrong results everytime.
    The result is not XML file displayed in the browser,
    but HTML file.
    I even tried to use HTML special code for <, >, "
    but still display as HTML file not XML file.
    How to do this?
    Thanks in advance. I put my codes below.
    Sincerely,
    Ted.
    ================
    Here is code for the JSP (called stk.jsp):
    <%@ page contentType="text/xml" %>
    <%@ page import="bean.Stock" %>
    <jsp:useBean id="portfolio" class="bean.Portfolio" />
    <% java.util.Iterator pfolio = portfolio.getPortfolio();
    Stock stock = null; %>
    <?xml version="1.0" encoding="UTF-8"?>
    <portfolio>
    <% while (pfolio.hasNext())
    stock = (Stock) pfolio.next(); %>
    <stock>
    <symbol>
    <%=stock.getSymbol() %>
    </symbol>
    <name><%=stock.getName() %> </name>
    <price><%=stock.getPrice() %> </price>
    </stock>
    <% } %>
    </portfolio>
    =================
    Here is the code for bean.Stock:
    package bean;
    public class Stock implements java.io.Serializable
    String symbol, name;
    float price;
    public Stock(String symbol, String name, float price)
    this.symbol = symbol;
    this.name = name;
    this.price = price;
    public String getSymbol()
    return symbol;
    public String getName()
    return name;
    public float getPrice()
    return price;
    ===============
    And here is bean.Portfolio:
    package bean;
    import java.util.Iterator;
    import java.util.Vector;
    public class Portfolio implements java.io.Serializable
    private Vector portfolio = new Vector();
    public Portfolio()
    portfolio.addElement(new Stock("SUNW", "Sun Microsystem", 34.5f));
    portfolio.addElement(new Stock("HWP", "Hewlett Packard", 15.15f));
    portfolio.addElement(new Stock("AMCC", "Applied Micro Circuit Corp.", 101.35f));
    public Iterator getPortfolio()
    return portfolio.iterator();
    }

    Hi
    I'm not sure whta your query is but I tested your code as it is has been pasted and it seems to work fine. There is an XML output that I'm getting.
    Keep me posted.
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems
    http://www.sun.com/developers/support

  • How to convert unstructured document into structured document

    I have many unstructured documents. Is it possible to convert these documents into strcutured documents? I know that structured FM uses DITA which is different from unstrcutured document. This is client's requirement so I want to get community views on this.

    Yanesh,
    I would approach this in 2 stages.
    Understand how DITA works independently of FrameMaker first. I say this because DITA is not a straight forward 'out of the box' experience. This could be a good starting point -http://www.technicalcommunicationcenter.com/2011/04/13/technical-book-review-practical-dit a-a-nuts-and-bolts-guide-to-structured-technical-writing/
    Understand how FrameMaker works with DITA. FrameMaker has it's own way of how you author DITA based content. You might want to look at tools such as DITA FMx - http://www.leximation.com/dita-fmx/, which claims to make DITA authoring easier with FrameMaker.
    If you are initially just producing PDF from your DITA content, then FrameMaker is probably the best way of getting the results you want, as FrameMaker templates work the same with structured content, as they do with unstructured.
    Good luck
    Mark

  • How to print devlievery document with out condition record mess type

    Hi,
    Actually user want to take the sample print out  ( Hard copy ) of the delivery note and other documents for reference, even the message type processed, not processed and even ended with errors also
    I have written a program to display the delivery document numbers  with check boxses and added one button in application tool bar.
    onece user executed the program, he will able to see all the delivery or sales numbers with checkboxes.
    now requirement is, users will select check box and click on the print button it should fire printouts in local printer of user location.
    for this what we are planning is we want to maintian the entries in NAST by RV_MESSAGE_* function modules and printing the output immedaietly
    If any one worked on this kind of requirement, please suggest step by step, how we can print the documents with directly maitaining the message types with out condition records
    Thanks in advance.
    Raju

    Hi,
    Generally if we create any document ( sales or delivery ), based on the condition record message type will be created and with message type details print will be triggered when the medium is 1, date time 4
    But in my case i want to take the printout irrespective of the message and condition records
    i want to take printout even if the message processed,not processed and ended with error.
    is there any way to take the print of the documents by using function modules or updation of NAST table.
    Please help me.
    Thanks in advance
    Raju

  • How to convert word documents to html page in sharepoint online 2013

    Hi,
    I am new SharePoint and still learning it.
    I have been tasked to do the following on office 365 E3 SharePoint 2013 Online edition.
    1) I have to create a Web page in asp.net
    2) This page needs to show document from a given SharePoint folder and bind them in a grid or dropdown on the asp .net web page
    3) On selecting the document from the drop down or gird (on asp .net webpage), I need to show the SharePoint word document as HTML on the webpage (something like word to html) Note: These SharePoint word document may contain Images, bullets, tables etc. 
    What I have been able to do till now
    1) I have been able to connect to SharePoint from ASP .net application.
    2) I have been able to retrieve document from a specific SharePoint folder.
    3) Read the document from SharePoint folder and bind them to a drop down on the asp .net page.
    What is missing?
    I am not aware about any API that SharePoint Online provides to convert Word document to HTML. Any code sample or reference on how to will be much appreciated. 
    I am not also not sure what is the best way of achieving the functionality this?
    Thanks 
    Krishna

    If this was SharePoint server then it would be easy however in O365 You need to create a app which will use the word automation service and below is  powershell which you can use for the conversion:-
    # This script will convert Docx to PDF using word automation and similarly it can be used to convert to HTML
    $wordFile="http://contoso/kick.docx"
    $pdfFile="http://contoso/kick.pdf"
    $wasp = Get-SPServiceApplicationProxy | where { $_.TypeName -eq "Word Automation Services Proxy" }
    $site = Get-SPSite "http://contoso"
    $ConvertJob = New-Object Microsoft.Office.Word.Server.Conversions.SyncConverter($wasp)
    $ConvertJob.UserToken = $site.UserToken
    $ConvertJob.Settings.UpdateFields = $false
    $ConvertJob.Settings.OutputFormat = "PDF"
    $ConvertJob.Convert($wordFile, $pdfFile)

  • How to attach a document with the Requisition Workflow?

    I am testing the Oracle Requisition Demo workflow.Whenever i initiate the
    workflow process with Reminder Requisition Document Option.The browser pop up
    with the Error "The requested URL cannot be retrieved". Can anyone please guide me how do i attach a document with this process?
    Regards,
    Abrar

    This field in the demo is designed to execute a PL/SQL procedure not store and attached document.
    for example if you launch it from the demonstration Page instead of the launch process page the following will be populated into the document field. (PLSQL:WF_REQDEMO.REMINDER_REQ_DOCUMENT/WFDEMO:A1)
    You can store a CLOB or BLOB in a workflow document attribute. Here is a link to the doc.
    http://download-west.oracle.com/docs/cd/B13789_01/workflow.101/b10284/defcom11.htm#doc
    If you want to upload and pass documents through a workflow you can do it in a variety of ways. Personally I would use Oracle Files if I wanted it off the shelf. Or use Oracle Text and the database and pass the document throught the workflow as a URL. There is also the CMSDK.

Maybe you are looking for

  • 8310 - Not Receiving...

    Hey,  My BB 8310 just recently started doing this and it's very annoying... I can receive texts as soon as they are sent; however, sometimes there is a delay on any email, facebook notification, and myspace notification. On top of that, lets say I've

  • Is there a way to use the iCloud framework with keeping my data local?

    Even before the coming to light of the NSA scandal and Apple's involvement in it, I wasn't really comfortable with uploading my data into the iCloud. After all, there's an american saying that "possession is 80% of ownership". Frankly, I don't want t

  • .war file vs properties files in weblogic 5.1

              I work with WebLogic 5.1 and I'm trying to deploy a web application which gets           a properties file. If I deploy it as an expanded directory hierarchy (with the           properties files into WEB-INF/classes) I have no problems. Whi

  • Systems preferences is frozen cant sign out

    I am trying to shin out of my computer and it tells me to quit System Preferences.  When I click on System Prefereces icon I get the iCloud pop up and I can't close it.  It is frozen. Just have the yellow shrink button that will work.

  • FND_VIEWOBJECT_NOT_FOUND

    I am trying to make a stand alone region that I can embed into custom or seeded pages. This particular region does an employee search, though I will be dding more functionality after I get the basic version working properly. I made a test page and ex