Special characters in java, oracle and html

Discussion in 'Java' started by Barry Olly, Oct 20, 2003.

  1. Barry Olly

    Barry Olly Guest

    Hi,

    I'm working on a mini content management system and need help with
    dealing with special characters.

    The input are taken from html form which are then stored into a
    varchar column in oracle database.

    When i retrieve the data, some of the special characters have been
    changed to ??? and also
    fields with double quote are modified.

    I believe there two issues;

    1. dealing with special characters

    2. display special characters back in html form textfield after
    retrieving.

    e.g.

    This is the line with "quote" saved to database
    This is the line with "quote" retrieved from database

    This is the line with displayed in html text field.


    Any help will be much appreciated.

    Thanks in advance.
     
    Barry Olly, Oct 20, 2003
    #1
    1. Advertising

  2. Barry Olly

    Paul Lutus Guest

    Barry Olly wrote:

    > Hi,
    >
    > I'm working on a mini content management system and need help with
    > dealing with special characters.


    Don't cross-post without a reason. Please say which distribution, which
    database, which source application, which destination application.

    Choose one newsgroup. Make one post.

    Bogus follow-up deleted.

    --
    Paul Lutus
    http://www.arachnoid.com
     
    Paul Lutus, Oct 20, 2003
    #2
    1. Advertising

  3. Barry Olly

    Doyle Guest

    (Barry Olly) wrote in message news:<>...

    > I believe there two issues;
    >
    > 1. dealing with special characters
    >
    > 2. display special characters back in html form textfield after
    > retrieving.
    >


    The quick and dirty method would be to put a character filter the end
    of your i/o operation that is giving you trouble.

    public class Filter
    {
    public String filter(String input)
    {
    // for each special character, convert it into its
    // appropriate escape/ampersand sequence and add it back into the
    string
    // in the place of the special character e.g. > ==> &lt
    }
    }

    mypetrock
     
    Doyle, Oct 20, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Mueller
    Replies:
    3
    Views:
    33,043
    Stefan Mueller
    Jul 23, 2006
  2. Replies:
    2
    Views:
    1,095
    Ingo Menger
    May 31, 2007
  3. rvino
    Replies:
    0
    Views:
    4,660
    rvino
    Aug 14, 2007
  4. Feyruz
    Replies:
    4
    Views:
    2,187
    Sherm Pendley
    Oct 14, 2005
  5. majna
    Replies:
    4
    Views:
    677
    Thomas 'PointedEars' Lahn
    Sep 19, 2007
Loading...

Share This Page