-encoding type ? Pls, help me !

Could everybody pls answer my question :
How many -encoding types used with javac ?
(I search in java tool document but don't find the full list of -encoding type)
I try to use javac -encoding "UTF16", "unicode" and compile: OK !
When I use javac -encoding UTF8 (I edit source code by Notepad, UltraEdit) and compile: error. I think J2SE don't understand this encoding type ???
How compile java file with UTF8 encoding ?
Thank you very much !

Make sure you save your source files in UTF-8 encoding without the BOM (byte order mark) signature. Notepad will insert the BOM at the beginning of a UTF-8 file, which chokes the javac compiler. I don't know about UltraEdit, but jEdit can.
javac -encoding UTF8 yourfile.java

Similar Messages

  • String encoding problem - pls help.

    I need to read in a string, let say as aString (in ASCII)
    inside my program will produce astring, bString
    i want the string b in unicode and insert to string a.
    but string a need to be ascii.
    structure like:
    for example:
    aString = "<datetime id number $insertHere>"
    bString = someCharatersInUnicodeFormat
    finalString = "<datetime id number someCharatersInUnicodeFormat>"
    but finalString is in ASCII.
    how to do it in java ?
    do it need to append it in bits level ??
    how to manage the bit level in java ?
    if i want to take a look on the bytes or bits, how to write it out in java ?
    thanks....

    while, of coz it will be fine if i use UTF-8 encoding
    for my file.
    Then it will much easier to write my chinese word.
    But actually, the file is produce for another
    system.
    and that system only accept ascii file.If the other system only accepts ascii files you can't write chinese characters.
    DrClap already tried to make this clear to you.
    What do exactly you mean with ascii. You possibly mean something different than DrClap, all the others here an I mean.
    So i need to make up an ascii file with the chinese
    word in unicode.What do you mean with unicode? Unicode is not an encoding
    Often people say Unicode but acually they mean UTF-16 which is the native internal representation of text in the Microsoft Windows NT, Windows CE, Qualcomm BREW, and Symbian operating systems; the Java and .NET bytecode environments".
    http://en.wikipedia.org/wiki/Comparison_of_Unicode_encodings
    The example i post up there is the correct output.
    Is there anyone know how to make up a such file like
    that ?Independenent of what I think of the idea of mixing up encodings within one file, you can write the first bytes ascii encocded and append an "unicode" encoded part.
    FileOutputStream fileOut = new FileOutputStream("file");
    // whatever this should be
    String unicodeEncoding = "???"; 
    byte[] bytes;
    bytes = "ascii part".getBytes("US-ASCII");
    fileOut.write(bytes, 0, bytes.length);
    bytes = "unicode part".getBytes(unicodeEncoding);
    fileOut.write(bytes, 0, bytes.length);

  • How to get file encoding type

    Hi ,
    How to get the file encoding type,
    for example file is saved with the .txt and encoding is utf-8 and another file is saved .txt with encoding is ascii,
    actually before reading the file i want idetify the encoding type
    please help me it is very urgent for me..
    thanks in advance

    As there is no established regime for signing most encoding types, the only way to do this is to start parsing the file in one encoding, see if you get something that makes sense, and if not try another encoding, and so on. I.e. you have to code it yourself and even then it is not usually reliable. Sorry.
    Drake

  • Hi, i forgot my macbook pro(snow leopard) password and i tried to reset it through single user mode, but whenever i type, everything comes out in CAPs instead of lower case. Each time i press the minus(-), it always comes out as an underscore(_).Pls help.

    Hi, i forgot my macbook pro(snow leopard) password and i tried to reset it through single user mode, but whenever i type, everything comes out in CAPs instead of lower case. Each time i press the minus(-), it always comes out as an underscore(_).Pls help.

    Well, you can try easing the shift key up with something thin but flexible (credit card sort of thing) but if the contacts below are stuck you may need to get it seen to by an authorised repairer.
    If you can borrow a keyboard (a PC one will probably work as long as the password is alpha-numeric with no special characters) you can at least get in to backup your HD before going for repair.

  • HT3702 when I finish putting my card details in, I press next and then it says an error occurred!(above the different type of cards) some one pls help

    when I finish putting my card details in, I press next and then it says an error occurred!(above the different type of cards) some one pls help!

    when I finish putting my card details in, I press next and then it says an error occurred!(above the different type of cards) some one pls help!

  • Very  Urgent Pls  help :  Change of  payload type to  user-defined types

    Hello Experts
    I was using sys.xml_type as payload type in my queue table creation.
    consider xml message
    <order>
    <id>1</id>
    <load rerer="mq" erere='gg" > </load>
    </order>
    This i inserted into queue table using enqueue process.
    this is done.
    BUT NOW My manager wants to change the payload type.
    he created a type
    create or replace type systype as object (msg varchar2(4000));
    Now payload type of queue table is changed to
    PayloadType==>aq.systype.
    Pls help me how can i insert xml messages into this queue table.
    This is very urgent. Pls help me
    S

    I've just read this thread three times and I have absolutely no idea what you are doing, in what version, and what you are asking for help with.
    Do you want to change the message type? If you do you MUST drop the queue and start over again from the beginning.
    Do you want to enqueue messages?
    Post your DDL and other relevant information or you are on your own. We can not guess at your issue.

  • When i type my email, the text would go on and on and overflows. I mean to say it doesn't autmatically hit the right hand side wall and change to next line! I have to manually press enter and then next line starts. Started happening suddenly.pls help.

    When i type my email, the text would go on and on and overflows. I mean to say it doesn't autmatically hit the right hand side wall and change to next line! I have to manually press enter and then next line starts. Started happening suddenly.pls help.

    Does it happen when you reply to an email? If so, it might be that there's content in the original email (like an image or something similar) that overflows the window content, therefore the Mail app, when you hit the border, follows the content below instead of going on a new line. You might wanna try that.
    Also: Please do not post the whole question in the question title.

  • I've used firefox for a month now but recently if I type on facebook the quick find search bar pops out. Even if I press Esc, when i type on facebook again the quick find bar pops out again. pls help..

    I've used firefox for a month now but recently if I type on facebook the quick find search bar pops out. Even if I press Esc, when i type on facebook again the quick find bar pops out again. pls help..
    even when i click the register on the top right of mozilla it wont allow me to.

    I've used firefox for a month now but recently if I type on facebook the quick find search bar pops out. Even if I press Esc, when i type on facebook again the quick find bar pops out again. pls help..
    even when i click the register on the top right of mozilla it wont allow me to.

  • Help me export DV VIDEO Encoder Type 2 with cs6

    Dear !
    I use AP CS6 edit my film. When i export my video 1minutes and 10 minutes then :
    -export 1minutes
    -Export 10minutes
    Media Encoder CS6
    After endoder done i use Ulead Videostudio 9 check file info
      i see it different.
    i want export my video have duration over 10minutes with compression DV Video Encoder-Type 2
    Please help me.
    Thank !

    I do believe PP will export to different types depending on the length of the export.  I'm not aware of any way to change that type in PP itself.  But there are third party tools which can do the job.

  • Query-Automatic assignment of Record type to Book of Business-Pls help me

    I have a query about Automatic assignment of record in Book of Business.
    Using 5 record types & 50 regions as a part of Book of Business. You can say 50 sub-books.
    I want to assign these 5 record type to particular Book when to create & modify.
    Eg. When I create new account it should be automatically assigned to Book 1 & later I modify this account for reassignment to new user then it should be automatically added to the new user’s book.
    I need to create workflow for this as Assign to book criteria for both when new record saved & when modified record saved.
    I have tried this & its working; however problem is with the creation of two many workflows.
    50 region (Books) x 5 record types * 2 - Create/modify flow = 500 workflows for one country!
    If I am right then I can assign 1 record type with action as create or modify in 1 book only.
    How to reduce these no. of workflows?
    Pls help me out in this regard.
    Regards
    Mangesh

    Mangesh,
    I am sorry to tell you that there is no quick answer to this but i will say that maybe you need to rethink your book structure and their requirements here.
    I have 4 types and 7 regions so you need to create books to allocate all these on create and also modify. Customers have raised concerns with this to Oracle and they are looking into it but they are along way from completing this. Sorry to spoil your day but i would strongly ask you to consider your books structure before you complete this.
    Otherwise if you are using webservices you could assisgn the book when the record is piped into the CRM and then you only need to complete the modify workflows.

  • I can't unlock my ipad 2-the screen is frozenand I can't type in my password, can't shut it off and can't connect to itunes because I need to unlock it-which I can't..PLS. help!  Thanks!

    I can't unlock my ipad 2-the screen is frozenand I can't type in my password, can't shut it off and can't connect to itunes because I need to unlock it-which I can't..PLS. help!  Thanks!

    Try this.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • I have been using Itunes on my HP laptop for 12 months and over the past month have not been able to access the Itunes store or any of the Itunes Help type menu's. When in Itunes I click on the Store icon and the top middle box gets to Half way. Pls help

    I  have been using Itunes on my HP laptop for 12 months and over the past month have not been able to access the Itunes store or any of the Itunes Help type menu's. When in Itunes I click on the Store icon and the top middle box gets to Half way. Pls help

    I had the same tried loads of fixes
    saw this on the community from whatheck
    In windows 7 click on your start menu, go to the accessories, right click on the command icon and choose "run as administrator"
    Once it opens type the following command...
    netsh winsock reset
    Hit enter and it should say something like winsock reset successful now reboot your computer
    IT WORKED....... cleared all the "action2 on the CPU and loads IStore perfectly

  • TS3844 compressor failed Log. Pls help! ?xml version="1.0" encoding="UTF-8" standalone="yes"? logs tms="357248472.250" tmt="04/27/2012 15:41:12.250" pnm="Batch%20Monitor"     log tms="357248472.250" tmt="04/27/2012 15:41:12.250" pid="7121" kind="mrk" sub=

    COMPRESSOR Failed Log....Pls help!

    digital rebellion has a crash analyzer that's part of Pro Maintenance Tools
    http://www.digitalrebellion.com/promaintenance/
    There's a free trial, but it's worth every penny.

  • Not getting PO printed while using bursting pls help

    Hi All,
    Working on converting PO report to XML. While using bursting to print the pdf file the document is not sent to the printer..
    But in the output file of the "XML Publisher Report Bursting Program" getting success.
    Not sure why report output is not sent to the printer.
    Pls help......
    Thanks
    Rajesh
    Edited by: Badsha on Jun 17, 2010 2:19 AM

    Hi...Please check the Burst Control file with the printer & IP details.
    Look for the file below.
    <?xml version="1.0" encoding="UTF-8"?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
    <xapi:globalData location="stream">
    </xapi:globalData >
    <xapi:request select="/DATA/LIST_DEPT/DEPT/LIST_EMPLOYEE/EMPLOYEE">
    <xapi:delivery>
    <xapi:email server="${EMAIL_SERVER}" port="${EMAIL_PORT}"
    from="${FROM_EMAIL_ADDRESS}"
    reply-to ="${REPL_TO_ADDRESS}">
    <xapi:message id="email1" to="${TO_EMAIL_ADDRESS}" cc="${CC_EMAIL_ADDRESS}"
    attachment="true" content-type="html/text"
    subject="Employee Report for Empno ${EMPNO}">
    Dear ${ENAME}, Please review the attached document.</xapi:message>
    </xapi:email>
    <xapi:filesystem id="file1"
    output="C:\burst\sample\${EMPNO}_${ENAME}_${MGR}_PRINT.pdf"/>
    <xapi:print id="print1" printer="${PRINT_URL}" copies="2"
    orientation-requested="3" />
    </xapi:delivery>
    <xapi:document key="${EMPNO}"
    output-type="pdf" delivery="email1">
    <xapi:template type="rtf" location="${TEMPLATE_LOC}"
    filter=".//EMPLOYEE[DEL_CHANNEL='EMAIL']" >
    </xapi:template>
    </xapi:document>
    <xapi:document key="${EMPNO}" output-type="pdf" delivery="print1">
    <xapi:template type="rtf" location="${TEMPLATE_LOC}"
    filter=".//EMPLOYEE[DEL_CHANNEL='PRINT']" >
    </xapi:template>
    </xapi:document>
    <xapi:document key="${EMPNO}" output-type="pdf" delivery="file1">
    <xapi:template type="rtf" location="${TEMPLATE_LOC}"
    filter=".//EMPLOYEE[DEL_CHANNEL='FILE_SYSTEM']" >
    </xapi:template>
    </xapi:document>
    </xapi:request>
    </xapi:requestset>
    check the printers setting as required....aslo check what printer you are using for pdf printing...Pasta Printing??
    Thanks
    Ratnesh

  • Problem with encoding..pls have a look at this.

    i'm getting data posted to a servlet in this format.
    Content-Type: application/octet-streamContent-Transfer-Encoding: binary&#934;&#9829; &#9787; &#9787;
    &#9829; d e &#9562; &#9556; ,&#9786; -&#9786; ?&#9786; �&#9786; &#8992;&#9786; &#8993;&#9786; X&#9787; Y&#9787; &#9565;&#9787; &#9564;&#9787; * &#9786; &#9794; * S P E C C Y
    ~&#9787;&#9786; &#9829; &#9792; &#9644; &#9786; � S P E C C Y ~&#9787;&#9787; &#9786; &#9787; &#9794; � &#9660; &#9787; B S P E C C Y ~&#9787;&#9786; &#9829; &#9830; &#9835; &#8593; " &#9786;
    how can i get the string equivalent of this.?
    i tried the following codes to receive the data.
    InputStream in = request.getInputStream();
    BufferedReader br = new BufferedReader(     new InputStreamReader(in));
         String strdata=null;
            String receivedData="";
             do
                  strdata=br.readLine();
                  if(strdata!=null)
                       receivedData+=strdata;
                  System.out.println(strdata);
             while(strdata!=null);
             byte[] receivedDataBytes=receivedData.getBytes();Also i tried this
    BufferedInputStream bis=new BufferedInputStream(in);
             bis.read(data, 0, 330);still its not working...pls help!!!

    yes i'm the server.
    client is a hardware device and it posts data to the url which is a servlet.
    the client sets some custom headers and the body
    i was able to read the headers set by the client.
    but the body part comes like this.
    Content-Disposition: form-data; name="data"
    Content-Type: application/octet-stream
    Content-Transfer-Encoding: binarythese were also there in the body part but i was able to read them as meaningful strings..
    i need to submit the status by today.
    i can't say them that i could read the data...
    i need to tell soem valuable reasons..
    pls help!!

Maybe you are looking for