Convert ISO Latin1 to Unicode

Hello every one
May some one help me to figure out how to convert a ISO Latin1 String to a Unicode String. My problem is : i have to write a sevrlet which receive a parameter which is a ISO Latin1 String, so before to do anythng i have to convert that String into a Unicode String , am i right??
Please help me as soon as possible
Thank alot

Hi Joni,
First, thank you for replying me.I've tried your method but it doesn't word, maybe i did a wrong thing. I'gonna explain my problem as below :
- In my servlet, i receive a ISO Latin1 String like parameter encrypted by a JavaScript code and the Function is :
function Encrypt(textValue)
output = new String;
     Temp = new Array();
     Temp2 = new Array();
     TextSize = textValue.length;
     for (i = 0; i < TextSize; i++)
     rnd = Math.round(Math.random() * 122) + 68;
     Temp[i] = PWD.charCodeAt(i) + rnd;
     Temp2[i] = rnd;
     for (i = 0; i < TextSize; i++)
     output += String.fromCharCode(Temp, Temp2[i]);
- And here there is the function in also JavaScript that unEncrypt :
function unEncrypt(theText)
output = new String;
Temp = new Array();
Temp2 = new Array();
TextSize = theText.length;
for (i = 0; i < TextSize; i++)
Temp[i] = theText.charCodeAt(i);
Temp2[i] = theText.charCodeAt(i + 1);
for (i = 0; i < TextSize; i = i+2)
output += String.fromCharCode(Temp[i] - Temp2[i]);
return output;
All i want is write a function that does the same as "unEncrypt" but in Java. Do you have any ideal ??Please help me to find out
thank alot

Similar Messages

  • How to convert .iso to .img

    i am being driven absolutely madd by my computer. all i want to do is a simple task, yet hours of my life have now been drained. so to save the rest of my time as well as others in the future, how does one convert a .iso file to .img on a mac? (yes, i've looked at every forums answers and ive copied the instructions (which were slightly different for each forum) perfectly into terminal, but nothing happens. so lets make this as simple as can be....
    just in case this maters, i'm running osx mavericks.
    on my desktop there is an iso file we will call X.iso.
    i want X.iso to be converted to X.img.
    simple right? or at least you’d think so….
    if anyone can write out the formula that i can then type into terminal, you will achieve god like status in my mind.
    the file is on my desktop, and i want the converted file to end up on my desktop as well. so because the file location is simple, and universal, the formula should be pretty easy to figure out.
    thank you to whoever does.

    hi allan,
    thanks for the super quick reply, but i don't think this is true. theres definitely a way of converting .iso to .img; theres many people out there who claim to have success with this through terminal. it doesn't matter what the file is called... like i said in the original post... for reasons of simplicity, we are going to call it X.iso; the name is irrelevant; it's the formula that gets typed into terminal that i need.
    i don't mean to sound rude, but if you don't have an answer please just keep your comments to yourself. the last thing any forum needs is a bunch of "i don't know"'s. there is a way, and i want to hear the formula from someone who knows what he/she's doing.
    a couple examples of this formula from other websites are as follows...
    hdiutil convert -format UDRW -o /convert/newfile/output.img /convert/source.iso
    or
    Type "hdiutil convert source.iso -format UDRW -o destination.img" without quotes, and then press "Return." Replace "source" and "destination" with their actual values.
    BUT...
    none of them have worked for me. this being said, it's worked for others somehow. i must be typing something wrong. this is why i need a mac genius. any takers?

  • Convert Hexadecimal NCRs to unicode characters

    I have Hexadecimal NCRs in comments while importing comments from the 3b2 application. How can this be converted to appropriate characters using acrobat javascript.
    For example: The comment contains (&#x000D) which should be converted to the appropriate unicode character. 

    I may be wrong, but I think you would use String.fromCharCode to convert a UCS-2 code into a string. So you then have to parse your string to process any escapes in it, and call that method.

  • Converting a character to Unicode

    Hello, im a first year java student and am currently taking a class in java where my teacher refuses to teach...........
    anyways, nuff bout my sob story, i was wondering what the line of code was that is used in converting a single character into unicode. Can anyone help?
    (Yes im well aware i suck at java, thats why im still learning ;) )
    Thanx in advance.

    I wrote this a while ago...see if it helps
    * Written by: Evans Anyokwu
    * Date : 28-Feb- 2002
    * Purpose : Helps convert numbers to various formats
    * import the java IO to enable the use of the streams
    import java.io.*;
    * The class decleration "Converter class"
    public class Converter
    public static void main (String [] arges) throws IOException
    * Making use of the BufferedReader class to get the
    * input from the keyboard.
    java.io.BufferedReader keyBoard = new java.io.BufferedReader (
    new InputStreamReader (System.in));
    * Prompts the user to enter anything to be converted.
    System.out.print ("Enter a string: ");
    * Get the user input as stream from the keyboard.
    String entered = keyBoard.readLine ();
    * Loop throught the input and select the char at every
    * point
    for (int i = 0 ; i < entered.length () ; i++)
    char c = entered.charAt (i);
    * Print the char at (i) and convert it to a unicode.
    //System.out.println (Integer.toBinaryString (c));
    System.out.print ("\\u00" + Integer.toHexString (c));
    //System.out.println (Integer.toOctalString (c));

  • Convert SAPscript documents to unicode

    Hi,
    we want to convert our system to unicode. By testing we found out that SAPscript documents created before the conversion cannot be displayed and also not convert after the unicode conversion.
    We have SAPscript documents as spoolfiles and in the folders of SAP Business Workplace.
    Is there any way to convert or save these documents before conversion?
    Thanks in advance.

    Hi Manuela,
    please have a look at note 842767 - it outlines the possible methods to save spool files containing SAPScript.
    I do not know about alternatives, which are not listed there.
    Best regards,
    Nils Buerckel
    Solution Management
    Globalization Services
    SAP AG

  • Error converting XSTRING to STRING (unicode, codepage)

    Hi all,
    I have a problem converting data from an external file into SAP.
    The file is uploaded via an application created in web dynpro, where I use the upload functionality. This returns the file in the XSTRING format, and  then use the following to convert (where l_xstring is the file and l_string is how I want the file):
      l_string TYPE string,
      l_xstring TYPE xstring,
      convt = cl_abap_conv_in_ce=>create( input = l_xstring ).
      convt->read( IMPORTING data = l_string ).
    This worked perfectly - until I recieved a file containing russian characters
    The SAP system (BI) is in Unicode, so this should be ok.
    I get a:
    CONVT_CODEPAGE
    CX_SY_CONVERSION_CODEPAGE
    Error, when trying to run it.
    Also the following migth be helpful:
    At the conversion of a text from codepage '4110' to codepage '4102':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'CL_ABAP_CONV_IN_CE============CP' had to be
    terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 18141. If this number is 0, the second error case, as
    mentioned above, has occurred.
    I have tried setting the codepage parameter of the READ method, but to no success.
    Anyone ??
    -Tonni

    Friend,
    Call the FM like below....
    CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
      EXPORTING
        IM_XSTRING        = x
       IM_ENCODING       = 'UTF-8'
    IMPORTING
       EX_STRING         = x.

  • Converting Hex string to unicode

    I am reading in a hex representation of Unicode characters as a string.(for example: 004100200042)
    I want to convert the string from hex to unicode, and write the corresponding characters to a file. The output should look like follow:
    A B (0041 = Capital A, 0020 = space, 0042 = Capital B)
    Could you please assist?

    Problem solved, no need to look into it. Thank you

  • Converting HTML Escaping to Unicode Escaping characters in Java

    Hi,
    I am getting some HTML escaping for special characters like pound, space, dollar etc. from database in HTML escaping format as  &apos; &pound;      &reg; etc.which I want to convert their Unicode equivalent escaping as U00A3,U0026. Java only convert & to & (U0026) but rest of the characters are not getting converted. If there is any API or way to do this please reply.
    Note : I cant change Database as there are already thousands of records & My front end only needs Java to do all these conversions I cant change that also.

    I have posted a method that does what you want. It was a long time ago since I wrote it and you should probably use a StringBuilder instead of a StringBuffer if you are going to use it in Java 5 or later. You can find the method in this thread:
    http://forum.java.sun.com/thread.jspa?threadID=652630

  • Convert from NVARCHAR2 to Unicode in SQL Plus

    I need to convert from NVARCHAR2 column data to Unicode format in a query. How can I do this?

    I need to convert from NVARCHAR2 column data to Unicode format in a queryMaybe with convert:
    SQL> select convert(n'ABC', 'utf8') abc from dual;
    AB

    1 row selected.?

  • How to convert ut8-8 to unicode

    Hi guys,
    For instance, I got a textbox and a user enter some Chinese characters in it. My page will need to put this string as a parameter to the other page. how should I convert these chinese character to unicode? At my servlet side, how should I put this unicode back to ut8-f in order to pass to database for searching? Thanks in advance !
    regards,
    Mark

    Hi,
    For instance, I enter &#36335; in google search then i will see one of it parameter with the url like this:
    q=%E8%B7%AFwhich is i guess is utf-8 based 16.
    any anyone know any javascript can convert &#36335; -> %E8%B7%AF and vice versa?
    when this %E8%B7%AF string send to servlet side, how do I convert it back to text for database to search ? Pls help, Thanks !

  • Convert single table to unicode

    Hello,
    Our functional team need to transfert new data from our non-unicode 4.7 system to our 4.7 Unicode system.
    In short, they want to convert and export single table from a non-unicode system to a unicode system.
    For our conversions, we usually use database export and import through system copy procedure for unicode conversion, which mean that we do a complete installation of the target system.
    Is it possible to use system copy procedure for unicode conversion of a single table??
    If not, shall we use brtool export table procedure for signle table conversion?

    Hi Manuela,
    please have a look at note 842767 - it outlines the possible methods to save spool files containing SAPScript.
    I do not know about alternatives, which are not listed there.
    Best regards,
    Nils Buerckel
    Solution Management
    Globalization Services
    SAP AG

  • How convert ISO 8859-1 (Latin-1) to char

    i use java read some web page, it contain ISO 8859-1 (Latin-1) Characters, like this:
    &#233
    &#234(i removed ";" at end)
    how convert it to char?
    thanks.

    Tin,
    I think you're looking for Charset.decode and maybe encode.
    keith.

  • Converting 8 bits to unicode?

    how do i convert 8 bit chars to unicode?
    thnaks in advance
    peleg

    You have to prevent sign extension on the (signed) 8 bit byte:   byte b= ...;
       char c= (char)(b&0xff);kind regards,
    Jos

  • Convert chinese character to unicode

    hello,i have a problem.
    how can i know the unicode of chinese character in a file?
    like this character ' &#31216; ' in a file a.txt
    then how can i do to read the a.txt file then get the unicode of the character?
    really need help..

    i want to know what is the algorithm and the coding
    of that tool.
    thanksYou might consider downloading the open source project and looking directly at the code for that tool. I imagine that you could create something similar in...oh, maybe 25 lines of code.
    retrieve the command line args
    open the specified file using the charset encoding specified
    for (all characters in the file) {
    if character is > 0xFF convert to \uXXXX
    output character to new file
    John O'Conner

  • Can I convert .ISO file into .CDR file ?

    Hi,
    I want to install Vista (beta) on my MacBook, using BootCamp. For this I need to burn the Wista.ISO image onto a DVD which then I can install on the partition created by BootCamp assistant. I only have this intel computer and a PowerBook G4.
    Question: Is there a way for me to convert the .ISO (vista image) into a .cdr file that I can burn normally? Or is there any other way to perform the istallation?
    Thank you

    Hi everyone, this is an update.
    I changed the title of my subject to "How do you burn .ISO files on Mac or convert them to .CDR?" and opened a new thread.
    I did not know how to delete this post so please, should you like to contribute your knowledge would you kindly consider posting on this new, above mentioned thread.
    Thank you very much

Maybe you are looking for

  • Plant name missing in PO line item details (Delivery address tab)

    Hi We are facing issue with ECC PO migration to SRM SUS client due to missing line item delivery address field name. We have PI integration. Name exist in PO XML on ECC interface but not copied on to PO line delivery address details (ME23n) Impact: W

  • LDAD Time Sync Error when creating user

    Hi, we have a web service for eDirectory 8.8 SP5 that creates a few users and does a couple other services. When the web service it configured to connect to 1 of the 2 eDirectory servers (1 is a master, and the other is read/write replica) then every

  • [solved] HAL fails repeatedly..

    My HAL is failing on every boot and if I try to start it manually: [shane@Shane-Arch log]$ sudo /etc/rc.d/hal start :: Starting Hardware Abstraction Layer [FAIL] Also... there is something else failing on boot, but it goes too fast.  I can't seem to

  • I am trying to upgrade to version 5 and it won't let me saying it needs to reboot to finish install of previous version. I have rebooted several times

    I am trying to upgrade to the latest version of firefox. When I attempt to run the install I get a message saying I need to reboot to finish installing a previous version of firefox. I have rebooted several times and still get the same message.

  • Unknow Application error log

    Hi all, we are having problems with a third application. The scenario is R/3 -(proxy)-> PI 7.10 -(soap)-> 3rd appl We get a correct response the most of the times, but eventually some messages returns an UNKNOWN APPLICATION ERROR in rwb. When we repr