Convert utf-8 to original text in servlet

Hi guys,
For instance, a user enter 路 in a text field then I convert this chinese character to utf-8 using javascript:encodeURIComponent to %E8%B7%AF and pass it as a parameter to the next page where the url will look like example :
http://www.google.com/search?q=%E8%B7%AF
so when I get %E8%B7%AF in servlet, how should I convert back to 路 in order to pass to database to search? any servlet api able to convert it?
Thanks & regards,
Plant more tree
Use emission free car

help....pls help...

Similar Messages

  • Jsf api to convert utf-8 to original text

    Hi guys,
    For instance, a user enter 路 in a text field then I convert this chinese character to utf-8 using javascript:encodeURIComponent to %E8%B7%AF and pass it as a parameter to the next page where the url will look like example :
    http://www.google.com/search?q=%E8%B7%AF
    so when I get %E8%B7%AF in backing bean, how should I convert back to 路 in order to pass to database to search? any jsf api able to convert it?
    Thanks & regards,
    Plant more tree
    Use emission free car

    help....pls help...

  • How to convert UTF-16 to UTF-8

    data source is 'ъѓъѓ№ѓфчр Фюыр№ 80Ъ                     ', it is Ukraine.
    I want to remove the blank, but no matter which key word in SAP I use, it doesn't work. i checked hexadecimal of the space from the text above , it is 00A0, but actually system only regard 0020 as space. i checked on internet,  the space of the text should be encoded with UTF-16 and system is UTF-8, 00A0 is extended ASCII, so 00A0 can't be seen in SAP system.
    my question is in this situation, how can a remove the space?

    Hi Eric,
    This Document might help u,
    Link: [how to convert UTF-16 to UTF-8|How to convert xml utf 16 to utf 8;
    -Dileep .C

  • Looking for an app that will convert written chemical formulas to text. Any suggestions?

    Looking for an app that will convert written chemical formulas to text. Any suggestions?

    I could not find any app that would do this. There are different types of message apps but nothing that I could find to do what I am looking for. For a specific contact I would like the message to have a notification that will not go away until I acknowledge it. Just like you would do if it was a pager.

  • How can I convert a mp3 to a text file?

    How can I convert a mp3 to a text file?

    Agree with dwb
    .. and wanted to say hi from my Schnauzer....

  • Convert UTF-8 to UTF-16

    How do I convert UTF-8 to UTF-16. I want code to be like this..
    public String convert (String string)
         //do something with the String
         return string;
    }Thanks in advance..

    From Unicode standard:
    <quote>
    Below code only supports three byte CJKs hex dumps
    character string:
    public class UTF8toUC16{
    public static void main(String[] args){
    String utf8 = "e799be";
    String bin, binrep, uchex;
    String[] bins, uc;
    if (args.length > 0){
    utf8 = args[0];
    if (utf8.charAt(0) != 'e' || utf8.length() !=
    6){
    System.err.println("This program accepts utf8
    hex-string for CJK");
    System.exit(1);
    bin =
    Integer.toBinaryString(Integer.parseInt(utf8, 16));
    binrep = "";
    for (int i = 0; i < bin.length(); ++i){
    binrep += (bin.charAt(i));
    if ((i + 1) % 4 == 0 && (i != bin.length() - 1)){
    binrep += ' ';
    System.out.println(binrep);
    bins = binrep.split("\\s");
    uc = new String[4];
    uc[0] = bins[1];
    uc[1] = bins[2].substring(2) + bins[3].substring(0,
    2);
    uc[2] = bins[3].substring(2) +
    bins[4].substring(2);
    uc[3] = bins[5];
    uchex = "";
    for (int i = 0; i < 4; ++i){
    System.out.print(uc[i] +" ");
    uchex += Integer.toHexString(Integer.parseInt(uc,
    2));
    System.out.println();
    System.out.println(uchex);
    System.out.println((char)(Integer.parseInt(uchex,
    16)));
    thanks! its solved my problem.. thanks :-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • When I copy and paste text in facebook, the text looks fine until I hit 'share' or 'comment' to submit it. Firefox then adds indiscriminate line-feeds within the text and it looks nothing like the original text. This does not happen in Safari. (Mac OSX 10

    When I copy and paste text in facebook, the text looks fine until I hit 'share' or 'comment' to submit it. Firefox then adds indiscriminate line-feeds within the text and it looks nothing like the original text. It makes it very difficult to read and awful to look at.
    This does not happen in Safari.
    (Mac OSX 10.6.4 with Firefox 3.6.6).
    == URL of affected sites ==
    http://

    Same problem, 3.6.8 and previous recent versions. I never thought to try another browser but I just pasted into IE and it worked fine. I copied from Firefox to IE and it worked as well. It's just when you paste into Firefox that you get the weird line breaks.

  • How to convert a Form to a Text file and XML file?

    Hi:
    I want to convert a Form to a Text file and XML file,but I don't know how convert?
    Please help!
    Oracle Form Builder V10.1.2.0.2
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
    Thanks in advance!

    ..or follow the steps in Mtalink note; Doc ID: Note:196924.1
    Forms XML Conversion Feature ( Converting Forms To XML)

  • Issue converting the following query to text.

    Hello guys, I'm trying to convert the following query to text and to use PRINT so that it returns theresult in the picture as output, help would be appreciated, thanks :)SELECT EventName, EventDate
    FROM EventTable
    ORDER BY EventDate DESC;

    This is an example, As I said it is not a good approach
    set nocount on
    declare @tab table(id int,txt varchar(100));
    declare @txt varchar(1000);
    declare @count int;
    insert into @tab
    values(1,'Text 1'),(2,'Text 2'),(4,'Text 4');
    select *,RN=ROW_NUMBER()OVER(ORDER BY (SELECT NULL)) into #temp from @tab
    select @count=@@ROWCOUNT;
    while @count>0
    begin
    select @txt =right(replicate(' ',50)+convert(varchar(50),ID),50) +
    right(replicate(' ',50)+convert(varchar(50),txt),50)
    from #temp where RN=@count
    set @count=@count-1
    print @txt
    end
    drop Table #temp
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Where are these unix executable files coming from and how do I recover the original text file?

    where are these unix executable files coming from and how do I recover the original text file?

    When you upgraded to Lion did you have AppleWorks installed on your mac?
    Most of the AW documents can be opened by Pages 09 or Numbers 09 with most of the orginal format in tact. (I do not know if previouse verision will work) just open the AW file with both and see which one works best.
    Text Edit will also open most of the AW files as well but will require a lot of work to restore them to their orginal format.
    If you have AW Database documents then they are not supported. 
    These document show up as "exec icons", Kind: Unix Executagle File.
    They also will show up as .cwk file if they are small files. I have a couple that were under 1mb that are shown as " Kind: AppleWorks Document" but will not open.
    The only option to open AW database is to have AW installed on a mac with a pre-Lion OS to recover the file.

  • How to convert amount which is in text to numeric..

    Hi all,
    Can anyone tell me how to convert amount which is in text to numeric..
    i am having the value as ' three hundred '
    it has to be converted to numeric as 300.
    ofcourse its surprising ...but required
    Any help will be greatful.
    rgds,
    raj

    hi Ravi,
    Check out <b>PSSV_TEXT_INTO_FIELD_CURRENCY</b> FM
    Regards,
    Santosh

  • Activity type origin text doesn't have been showed on Cost analysis report

    I have defined three acitivities TMAQ, TMO, CIF. But  the origin text column of these acitivities is not showing in cost Analysis report(althoug the origin is showed), i.e. when we go to an order & navigate to "Cost Analysis".  TCODE:CO02 (Production order)
    Anyone knows how to show the origin text ?
    Thanks a lot for your comments.
    Vero

    Hi Veronica
    I think maybe it´s missing the description in language you are running the report.
    Check transaction KL03 to see if the activity type has the description in the language you are logged.
    If not go to KL02 and update the description and try to run it again.
    Regards
    Fred

  • I can't find this anywhere... how to convert mp3 (not music) into text without spending much $$$.

    i can't find this anywhere... how to convert mp3 (not music) into text without spending much $$$.

    function(){return A.apply(null,[this].concat($A(arguments)))}
    hope1hope2 wrote:
    i can't find this anywhere... how to convert mp3 (not music) into text without spending much $$$.
    It's very unlikely that you'l
    l find any help here; this forum is used only
    for testing purposes. Unfortunately, I cannot suggest
    another forum
    Extra line breaks kindly supplied by the software.

  • Firefox doesn't show original text when replying an e-mail in Hotmail

    Firefox doesn't show the original text when replying an e-mail message in Hotmail. It's not an account issue since I've tried the same with Explorer and the original text DOES show...
    == URL of affected sites ==
    http://www.hotmail.com

    anyone fix the problem yet?I cleared my cookies and that didnt work.

  • Other options to convert scanned-document PDF into text?

    I often get PDF files where the document was scanned in as an image. I'm wasting time having to re-type these. I found a way online to let Google do a conversion but it is slow (link below if you're curious).  What are some other options for converting this type of PDF into real text?
    http://www.labnol.org/software/convert-scanned-pdf-images-to-text-with-google-ocr/5158/

    Well, at first I read your reply and thought .... sheesh, this is in the RTM category. I found the OCR command in the drop-down menu and ran it. I watched it going from page to page and heard a lot of disk activity. Then I started looking for the output. I checked to see if it had dumped the results into the Clipboard, but no. I ran a search of the hard drive for any file created today. Again no apparent output. The help instructions in Acrobat Pro 9 regarding OCR don't really say anything about where to find the output. Where should I look?

Maybe you are looking for