Re: string change in jsp



On Oct 16, 7:31 pm, Mitul Makadia <mitul.maka...@xxxxxxxxx> wrote:
On Oct 16, 12:16 pm, raj <2rajes...@xxxxxxxxx> wrote:





On Oct 16, 2:47 pm, neeraj <neeraj....@xxxxxxxxx> wrote:

On Oct 16, 10:57 am, raj <2rajes...@xxxxxxxxx> wrote:

hi,

i have a String S="hell(“two”)";

two is not surrounded with double quotes its with “two”.
i have set this string in request

request.setAttribute("Description",S);

from my jsp i called i tried to print S

<% out.print(request.getAttribute("Description")); %>

it should print me hell(“two”)

but its printing

hell(?two?)

two is surrounded with ?

pls sort my problem out

Raj

try this "hell(//“two//”)"- Hide quoted text -

- Show quoted text -

it prints

hell(//“two//”)

Hi,

You can try with String s = "hell(\"two\")"; It worked for me.

Which platform do you use for development? If you intend to use Non-
ASCII i.e “ in Java program or JSP please use its unicode rather than
character itself, the reason is that you Java or JSP file is saved
using ASCII or ISO-8859-1
depending on your OS platform encoding which may not include special
character in its range.

Thanks,
Mitul Makadia- Hide quoted text -

- Show quoted text -

Hi

i have used
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"
language="java"%>

it worked out
but when i am passing this string in querystring its not taking the
correct one its replacing with â in place of the quotes


.



Relevant Pages

  • Re: the efficientest strlen fun?
    ... "pleasant" is what i want to spell. ... i think this code is true while the string is made up of ascii ... I've worked on at least one platform where the second ...
    (comp.lang.c)
  • Deutsch nach ASCII konvertieren
    ... "ascii", $string, sub { ... also das to_ascii offenbar einen Latin-1-kodierten String will. ... Gefunden habe ich weiterhin eine kleine Sub, die die Ersetzung ... Ähnlich wie bei Variante 1 wird hier die Menge der Ersetzungs-Regexen ...
    (de.comp.lang.perl.misc)
  • UnicodeEncodeError in Windows
    ... def getdamage: ... """reads each line of war report ... """Build a string from a warrior's stats ... As I understand it the error is related to the ascii codec being ...
    (comp.lang.python)
  • Re: call of ShellExecuteEx causes error message
    ... My Java program brings up its own window and is for drawing curves, ... //define pix vector from Photoshop image ... //make string from pix vector ... the call of ShellExecuteEx worked. ...
    (microsoft.public.win32.programmer.networks)
  • RE: IE headers w patch level - new info
    ... Internet Settings\User Agent\Post Platform ... String Value: Q312461 ... The patch information that Internet Explorer displays ... logfiles, under the UserAgent field. ...
    (Focus-Microsoft)