Special characters in URL parameters retrieved as question marks

Hello,
I am posting a simple HTML form to a WebDynpro application, and then I retrieve the 2 parameters with the following code :
IWDWebContextAdapter adapter = WDWebContextAdapter.getWebContextAdapter();
String comment= adapter.getRequestParameter("comment");
Problem : some special characters (those with accents for instance) are retrieved as question marks. Their ascii character is always 65533 (unicode rather?).
I guess this is a problem of charset, but where could I change it ?
Trying to encode afterwards does not change the characters, I always get the question marks. But I may not do it the right way...
Any hint on that ?
Thanks a lot.
Best Regards,
Nicolas

Hi,
refer to following code.
Stop using deprecated object IWDWebContextAdapter
IWDProtocolAdapter adapter = WDProtocolAdapter.getProtocolAdapter();
     try {
          byte comment[]= adapter.getRequestObject().getParameter("comment").getBytes("ASCII");
          String str = new String(comment);
     } catch (UnsupportedEncodingException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
Ashu

Similar Messages

  • Japanese Characters working as URL parameters, turning to question marks when in URL string itself

    I'm having some trouble getting coldfusion to see japanese
    characters in the URL string.
    To clarify, if I have something like this:
    http://my.domain.com/index.cfm?categorylevel0=Search&categorylevel1=%E3%82%A2%E3%82%B8%E3% 82%A2%E3%83%BB%E3%83%93%E3%82%B8%E3%83%8D%E3%82%B9%E9%96%8B%E7%99%BA
    All of my code works correctly and the server is able to pass
    the japanese characters to the database and retrieve the correct
    data.
    If I have this instead:
    http://my.domain.com/index.cfm/Search/%E3%82%A2%E3%82%B8%E3%82%A2%E3%83%BB%E3%83%93%E3%82% B8%E3%83%8D%E3%82%B9%E9%96%8B%E7%99%BA
    My script (which works fine with English characters) parses
    CGI variables and converts these to the same URL parameters that I
    had in the first URL using a loop and a CFSET url.etc..
    In the first example, looking at the CF debug info shows me
    what I expect to see:
    URL Parameters:
    CATEGORYLEVEL0=Search
    CATEGORYLEVEL1=アジア・ビジネス開発
    In the second example it shows me this:
    URL Parameters:
    CATEGORYLEVEL0=Search
    CATEGORYLEVEL1=???·??????
    Can anyone suggest means for debugging this? I'm not sure if
    this is a CF problem, an IIS problem, a JRUN problem or something
    else altogether that causes it to lose the characters if they are
    in the URL string but NOT as a parameter.

    My suggestion was that you test with the
    first url, not the second. However, I can see a source of
    confusion. I overlooked your delimiter, "/". It should be "?" and
    "=" in this case. With these modifications, we get
    <cfif Len(cgi.query_string) neq 0>
    <cfset i = 1>
    <cfloop list="#cgi.query_string#" delimiters="&"
    index="currentcatname">
    <cfoutput>categorylevel#i# =
    #ListGetAt(currentcatname,2,"=")#</cfoutput><br>
    <cfset i = i + 1>
    </cfloop>
    If it is a failing of Coldfusion, the above test should fail,
    too.
    Now, an adaptation of the same test to your second url.
    <cfset url2 = "
    http://my.domain.com/index.cfm/Search/%E3%82%A2%E3%82%B8%E3%82%A2%E3%83%BB%E3%83%93%E3%82% B8%E3%83%8D%E3%82%B9%E9%96%8B%E7%99%BA">
    <cfset query_str =
    ListGetAt(replacenocase(url2,".cfm/","?"),2,"?")>
    <cfif Len(query_str) neq 0>
    <cfset i = 1>
    <cfloop list="#query_str#" delimiters="/"
    index="currentcatname">
    <cfoutput>categorylevel#i# =
    #currentcatname#</cfoutput><br>
    <cfset i = i + 1>
    </cfloop>

  • Escape special characters in url for redirection

    In my web page, I want all the characters of the URL to be lower case. For that I created the following method:
    private bool UrlFormatoCorrecto(string url)
    bool formatoCorrecto = true;
    bool upperCa = url.Any(c => char.IsUpper(c));
    if (url.Any(c => char.IsUpper(c)))
    formatoCorrecto = false;
    if (url.Contains(" ") || url.Contains("+"))
    formatoCorrecto = false;
    return formatoCorrecto;
    This works like a charm until a special character appears. The url that I get then will be the following:
    http://localhost/web/coches/proven%C3%A7a-aribau,-08036-barcelona,-barcelona
    So I have upper case characters. When I redirect it using the following code:
    if (!UrlFormatoCorrecto(urlActual))
    Response.RedirectPermanent(urlActual.Replace(" ", "-").Replace("+", "-").ToLower());
    I get the code again with the same URL with upper case. How can I escape the special characters so they won't bother me anytime I want to make the redirection?

    hello,
    you could escape special caracters with :
    Regex.Escape Method
    Regards
    Cédric

  • Passing values w/special characters in URL into an interactive report

    Hello,
    I have a problem and Ive been all over these forums and reading/trying everything I can to get something to work. I have a page that has a field called Name Search. The field is a TextField with autocomplete type. If I select a company name that contains special characters, like 'Blue Shield of California Life *&* Health Insurance Company', when I click go button (using a branch), it is supposed to pass this value into the URL to populate IR_COMPANY_NAME on the interactive report page to create the report filter. However, when it goes to the IR page, it actually filters on 'Blue Shield of California Life *& amp;* Health Insurance Company' with 'amp;' instead of & and doesnt find any matches. In the page source it is actually 'value="Blue Shield of California Life *& amp; amp ;* Health Insurance Company." Here is the URL that it produces:
    http://webtest2:7775/apex/f?p=102:IRCompanyList:995769774353901::NO:5,RIR:IR_COMPANY_NAME,P5_COMPANY_NAME:Blue%20Shield%20of%20California%20Life%20%26amp%3B%20Health%20Insurance%20Company,Blue%20Shield%20of%20California%20Life%20%26amp%3B%20Health%20Insurance%20Company
    The interesting thing is that I have another page that has a clasic report that lists all compnaies by name and the company_name is a link that passes the company name into the exact same IR and it works fine. In the page source it is value="Blue Shield of California Life *&amp;* Health Insurance Company" Here is the URL that this page produces:
    http://webtest2:7775/apex/f?p=102:5:995769774353901::NO:4,RIR:IR_COMPANY_NAME,P5_COMPANY_NAME:Blue%20Shield%20of%20California%20Life%20%26%20Health%20Insurance%20Company,Blue%20Shield%20of%20California%20Life%20%26%20Health%20Insurance%20Company
    I have modified every field involved changing between encoding, no encoding, changing display types (Standard Report Column, Remove HTML and escape special characters, etc). I have also attempted to encode the value myself prior to sending it to the next page. I have tried variations of the htf.escape_sc etc. I have also tried adding \&P2_COMPANY_NAME.\. I have also tried adding pl/sql to create a collection to store the values and then pl/sql to fill the values on the report page. It gives me the success message I setup, but it never actually fills the value.
    I am also having problems with another field that has a comma in it. I will wait to address that one to see if I can fix this first with hopes that it can be resolved by whatever I do to fix this issue.
    Any suggestions? I appreciate any feedback!
    Jen
    Edited by: J-Lig on Jul 13, 2012 10:20 AM
    Edited by: J-Lig on Jul 13, 2012 10:21 AM

    Thank you for your feedback!
    Yes, I forgot to mention that. It does come from a table, but company_name is not unique in that table. Meaning, it wouldnt know which ID to pass. Perhaps I should seperate the name out into another table and then I could pass the id. I was just hoping to get this to work programatically since the links from classic reports actually work correctly. I am starting to think this is a bug. This issue appears to have been addressed to make the links from reports pass the & correctly, but not in the branching?
    I have attempted to replace and then re-replace but I couldnt get it to work with IR_ fields as the filter fields are generated by the Interactive Report region. Do you have any insight working with those? Are there any tricks to it that I might be missing?

  • Dreamweaver still encodes special characters in URL - Bug?

    Dreamweaver 6 is still encoding my special characters when I enter a URL through the control panel AND hit enter. When I paste the link in code view or just paste it in the control panel Link field without hitting Enter, no formatting occurs.
    I have the setting under Code Rewriting in Preferences set to "Do not encode special characters", but regardless the reformatting occurs whenever I hit enter in the Link field in the Control Panel.
    For example:
    The link I'm pasting in is a dynamic one and is set to %%DC%%
    If I just paste the link into the control panel then click elsewhere the link is set and no formatting occurs. If I paste it in, then hit Enter the URL changes to %Ü%%
    Is this a bug or am I doing something incorrectly?

    I just tried it and it's happening in both.
    How it's occuring to me:
    - Open a new or old document.
    - Type in a random set of letters, highlight, then click inside in the Link field on the Control Panel
    - Type %%DC%%
    - Click off the random set of letters, and in code view the Link is still set to %%DC%% (so far so good)
    Now if you click back onto the random letters that are now linked, you'll see that the URL in the Link field now changes to %Ü%%, but the actual link in Code View remains %%DC%%.
    - Now click inside the link field in the control panel, but don't type or change the URL.
    - Click somewhere else to move the cursor out of the control panel
    - The link is now set to %Ü%% in both Code View and in the control panel

  • Url to file contains question mark...is this causing an error in itunes?

    hi!
    hope someone can help. my podcast file is stored at an address such as the one below:
    http://www.mysite.com/webmedia.php?irn=234
    however, this doesn't seem to generate a media enclosure with itunes rss. i know there is an issue with spaces in file names, is there a similar issue with question marks?
    thanks!
    grenadillo

    It's not the question mark as such, but the fact that the URL is using a PHP script to locate the podcast file. You need to provide a direct URL to the file itself.

  • Special characters in URLs

    I've used punctuation in the titles of some of my blog entries (e.g., "Bob's Birthday"). iWeb is including that punctuation in the URLs it generates for the entries. When I publish, I don't have any problem viewing the site and all the links are fine. But when I upload it (over ftp) to my website, those characters get garbled and break the links. (e.g., the apostrophe becomes a ?). I'm using Transmit to upload -- I've tried both ASCII, binary, and auto mode and none of them seem to work.
    Any ideas on how to solve this problem? It seems like it's in the ftp program somehow, since the published website works when I view it straight from my harddrive.
    Thanks!

    I'm using Transmit to upload -- I've tried both ASCII, binary, and auto mode and none of them seem to work.
    Try Cyberduck instead, set to UTF-8. Many have found that uploading with this app will solve the problem.
    The issue is really with the server -- you would have no problem with .Mac.
    Also turning off smart punctuation in the iWeb preferences might fix it.

  • Non-english characters in file names show as question marks

    It's probably iocharset=utf8 question, but it's not only cd-rom - native partitions with "defaults" options behave no better. What is the correct solution? Current locale is en_US.UTF-8, which should be OK.

    native partitions with "defaults" options behave no better
    What filesystems?
    For ntfs read http://wiki.archlinux.org/index.php/HAL
    Policies
    NOTE: this is deprecated from hal => 0.5.10
    and
    mount.ntfs linking
    As of hal => 0.5.10 the above policy may not work. This is a workaround forcing hal to use the ntfs-3g driver instead of the standard ntfs driver. Please note that this method will use the ntfs-3g driver for all NTFS drives on your system! As root create a symbolic link from mount.ntfs to mount.ntfs-3g.
    # ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs
    Possible issues using this method:
    if mount is called with "-i" option it doesn't work
    possible issues with the kernels ntfs module
    Locale issues
    If you use KDE, you may have problem with filenames containing non-latin characters. This happens because kde's mounthelper is not parsing correctly the policies and locale option. There is a workaround for this:
    1) Remove the "/sbin/mount.ntfs-3g" which is a symlink. code: rm /sbin/mount.ntfs-3g
    2) Replace it with a new bash script containing:
    #!/bin/bash
    /bin/ntfs-3g $1 $2 -o locale=en_US.UTF-8 #put your own locale here
    3) Make it executable: chmod +x /sbin/mount.ntfs-3g
    There is only a problem with partition labels containing spaces, so if you have such a label, replace the space with an underscore, otherwise when you try to mount it you will get an error.
    4) Add NoUpgrade=sbin/sbin/mount.ntfs-3g to pacman.conf.
    I think your understand Russian. Welcome to http://linuxforum.ru/index.php?showtopic=53488 and
    http://archlinux.org.ru/

  • Problem with special characteres

    Hi. I have a problem with java. I�m making an application that works with special characters and displays correctly on my local machine, as I use escape characters such as &igrave; for �. The problem is when I deploy the application on a unix machine. All of the special characters (�, �, �, etc) appear like a �?� (question mark). Any tips, please?
    Thanks in advance

    Andy2008 wrote:
    Hi. I have a problem with java. I&#146;m making an application that works with special characters and displays correctly on my local machine, as I use escape characters such as &igrave; for �. The problem is when I deploy the application on a unix machine. All of the special characters (&#145;, �, �, etc) appear like a &#147;?&#148; (question mark). Any tips, please?First step: read [this excellent introduction into Unicode|http://www.joelonsoftware.com/articles/Unicode.html], it will give you the basics you need to solve this problem.
    How do you input and output those characters? Simply print them to the console? Or write them to a HTML file (since you mention &<something>; notation)?
    "?" is normally the result when you convert a String (which is always in UTF-16 encoding in Java) to an encoding that can't represent your characters (ASCII for example).

  • Special characters in UCM site URL does not give error

    Hey Experts,
    If we put any special characters in site URL, UCM does not show 404 page .. for e.g.
    site URL is http://www.example.com/abc/xyzs/index.html.... if we add special characters in URL for e.g. http://www.example.com/#$abc/xyzs/index.html...
    then home page of site is displayed .....http://www.example.com/...
    Also http://www.example.com/ abc/xyzs/index.html shows home page ..
    Any idea why it is happening ??

    I would attribute this behavious to the SSUrlMap filter - which has the job of turning the friendly URL's into SS_GET_PAGE service calls. Apparently the way it parses the URLs and looks for the patterns does not consider these characters.
    Is it actually a problem?
    Tim

  • Non-English characters in URL for rwservlet

    I'm having a problem when I try to use non-english characters in a URL request to generate a report.
    This works fine:
    http://...rwservlet?report=r1.jsp&m1=Fred
    But if I try Fréd (e with accent graph) the report does not return any data even though the SQL by itself would find data.
    I tried UTF-8 encoding
    http://...rwservlet?report=r1.jsp&m1=Fr%C3%A9d
    8859-1 encoding
    http://...rwservlet?report=r1.jsp&m1=Fr%E9d
    Or just spell it out (not sure what that gets encode as):
    http://...rwservlet?report=r1.jsp&m1=Fréd
    But noting works. Any ideas?
    Thanks, Andreas

    Suggestions
    1) Try with NLS_LANG as
    SWEDISH_SWEDEN.WE8DEC
    2) Make a paramform and enter via paramform (unencoded)
    (This is just for testing purpose)
    3) Change machine locale to swedish and try
    4) Which reports version is this ?
    Please see
    BUG 2713695 - NLS CHARACTERS FOR PARAMETERS CHANGE TO QUESTION MARKS WHEN PASSED ON URL BAR
    Get in touch with Support to see if this is the issue and if "yes" get a one-off patch.
    [    All Docs for all versions    ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
    ---------------------------------------------------------------------------------

  • Special Characters in Links

    Hello,
    I work for a software company which offers a web application - an e-mail subscription management service. Our application sends e-mails out to subscribers which include links back to the websites of our clients. The problem we have encountered with some frequency is that some versions of Safari do not seem to like encoding of special characters in URLS. All of the links we send have encoded special characters in them. For example:
    http://service.govdelivery.com/service/edition.html?emailtype=subscription&format=HTML&code=MNMMCD5&date=2006-06-21 00:00:00.0
    We encode each "&" as a character entity in the URL. When encoded this way, the links do not work for many Safari users. If we remove the encoding (character entity) and simply insert an "&", the links will work for them.
    The problem is that the encoded version is the WC3 compliant one. It is not recommended to use special characters in URLs, such as < or &. Is anyone familiar with this issue? Is this true across all versions of Safari?
    Thank you for your help.
    Gabriel Zeck
    GovDelivery, Inc.

    We encode each "&" as a character entity in the URL.
    When encoded this way, the links do not work for many
    Safari users. If we remove the encoding (character
    entity) and simply insert an "&", the links will work
    for them.
    The problem is that the encoded version is the WC3
    compliant one. It is not recommended to use special
    characters in URLs, such as < or &. Is anyone
    familiar with this issue? Is this true across all
    versions of Safari?</div>
    I'm not sure if it is the Mail app or Safari which does this. Whichever, it is too clever by half. If it comes across a &, it changes it to %26, which is fine. But if it comes across a %26 it will re-encode the % and produce %2526, which of course is not.

  • Special character showing as upside down question mark on oracle report

    We have an oracle report which selects data from a database table. Report shows a name field and names with a special character is showing as upside down question mark.
    The name is Simon John ễễ BaileyŠğčẫ
    But when we run the oracle report the name is showed with 6 upside down question marks
    I am not sure if these characters are unicode? (beyond western european character set)
    Oracle database: 11.2.0.1 with nls_characterset = AL32UTF8
    Oracle Reports Server: 10.1.2.3.0 with the following locale settings:
    LANG=en_US.UTF-8
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    Any ideas, suggesstions, is this font related issue?
    Thanks for your help.

    You mean the operating system where the Oracle reports server resides?

  • 'Do not encode special characters' preference not working

    I have the preferences in Dreamweaver set to "Do not encode
    special characters in url'. However, every time I paste a url in
    the properties box, when I go to the source code, Dreamweaver has
    encoded the special characters, especially the "&". Is there
    another setting I have to change somewhere, or is there an update
    that fixes this?
    Thanks.

    "Jade73" <[email protected]> wrote in
    message
    news:fcbroh$7ih$[email protected]..
    >I have the preferences in Dreamweaver set to "Do not
    encode special
    >characters
    > in url'. However, every time I paste a url in the
    properties box, when I
    > go to
    > the source code, Dreamweaver has encoded the special
    characters,
    > especially the
    > "&". Is there another setting I have to change
    somewhere, or is there an
    > update that fixes this?
    You can find updaters for dreamweaver here
    http://www.adobe.com/support/dreamweaver/downloads_updaters.html

  • Everyone recives Question marks instead of periods !

    Many recipients of emails I send using mail, advise me that instead of
    periods when I end a sentance they see ? Question marks . This seems to be confined to non make computers.
    Does anyone know why this happens and how to stop it . I have been advised other
    mac users also suffer this question mark problem.
    Thank you
    Flaxy

    Flaxy,
    Though I know little of these sorts of things, I did remember reading this:
    +Other accented characters may give different results, including question marks or complete absence of the character. The no-break space, which Mail uses frequently in Rich Text, is encoded as A0 in Latin-1 and may appear as a ? in Outlook because A0 is not a character in UTF-8.+
    This is at the bottom of a webpage by Tom Geweke:
    http://homepage.mac.com/thgewecke/woutlook.html
    Do your no-name computer friends use Microsoft Outlook, and do your Apple friends use Outlook as well?
    Bruce

Maybe you are looking for

  • I have 2 ipod minis and 1 comp

    I have 2 ipod minis and only one computer. They both share the same songs. but now it wont let my ipod be reconized, and it says "Another user is loged in plz ask them to sign out." how can i get my computer to reconize them both again?

  • Payment at store and autopay???

    We have our bill set up on autopay. Can I go in each month and pay a portion of the bill and have it still come out on autopay? for EXAMPLE We have an account with mutiple lines and our bill is $135 each month. Say we want one of the people to pay $3

  • I cannot get the subtitles to work no matter how many times I set it up and I am doing it correctly, what is wrong?

    I cannot get the subtitles to work no matter how many times I set it up and I am doing it correctly, what is wrong?

  • T61 or Windows Vista used up disk space so fast ?

    Hi, Just purchase a new T61 with 140GB hard disk running Windows Vista Business.  After installing Office 2007 Standard and Acrobat v8 Standard.  I realized that I am left with only 13.5GB space. My personal data/files only take up about 20-25GB, inc

  • Delivery of Home Hub 4

    I'm due to be installed with BT Infinity 2 on Monday 30/09/13 with delivery of the router expected on Thursday 26/09/13. As I work full time I will not be in the house at the time and was wondering if a signature is required or will they post it thro