Storing Trademark, copyright and Registered symbols in Database.

Discussion in 'Java' started by lareds, Nov 17, 2003.

  1. lareds

    lareds Guest

    Hi,

    How to store Trademark, copyright or Registered symbols in Database.
    I dont have problem displaying them.

    This is what I am trying to do. I have a html page. I enter these
    symbols in the input box and pass them to servlet.From servlet I store
    it in the Database.
    When I do this it stores them as some jumbled chars in the database(
    when I use
    UTF-8 encoding in my HTML page) and '?' ( if I use ISO-8859
    encoding).

    Iam using java1.3 , windows 2000 and Oracle database.

    Any ideas ......
     
    lareds, Nov 17, 2003
    #1
    1. Advertising

  2. "lareds" <> wrote in message
    news:...
    > Hi,
    >
    > How to store Trademark, copyright or Registered symbols in Database.
    > I dont have problem displaying them.
    >
    > This is what I am trying to do. I have a html page. I enter these
    > symbols in the input box and pass them to servlet.From servlet I store
    > it in the Database.
    > When I do this it stores them as some jumbled chars in the database(
    > when I use
    > UTF-8 encoding in my HTML page) and '?' ( if I use ISO-8859
    > encoding).
    >
    > Iam using java1.3 , windows 2000 and Oracle database.
    >
    > Any ideas ......


    Have you considered or are you using a suitable datatype such as BINARY or
    flavors of the same?

    HTH,


    --
    Shripathi Kamath
    NETAPHOR SOFTWARE INC.
    http://www.netaphor.com
     
    Shripathi Kamath, Nov 17, 2003
    #2
    1. Advertising

  3. lareds

    Peter K Guest

    "lareds" <> wrote in message
    news:...
    > How to store Trademark, copyright or Registered symbols in Database.
    > I dont have problem displaying them.
    >
    > This is what I am trying to do. I have a html page. I enter these
    > symbols in the input box and pass them to servlet.From servlet I store
    > it in the Database.
    > When I do this it stores them as some jumbled chars in the database(
    > when I use
    > UTF-8 encoding in my HTML page) and '?' ( if I use ISO-8859
    > encoding).
    >
    > Iam using java1.3 , windows 2000 and Oracle database.
    >
    > Any ideas ......


    Maybe the database can't store those symbols? Maybe it can only store ascii?

    Peter
     
    Peter K, Nov 17, 2003
    #3
  4. lareds

    lareds Guest

    Hi,

    I am trying it this way....

    From HTML I take the value in the Input field and use Javascript
    escape() funtion on that value. So for Trademark, I get "u2122".

    This is passed to the servlet, and I replace "u2122" with "%99"
    and pass it to URLDecoder.decode() to convert it to ascii.

    At this point if I print it out, it shows '?'.
    Why does this happen. I am using java 1.3, windows 2000.

    Note: I noticed that I can directly store these symbols in the
    Database, but not through the HTML/Servlet.












    "Shripathi Kamath" <s h r i p a t h i k a m a t h @ h o t m a i l . c o m> wrote in message news:<>...
    > "lareds" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > How to store Trademark, copyright or Registered symbols in Database.
    > > I dont have problem displaying them.
    > >
    > > This is what I am trying to do. I have a html page. I enter these
    > > symbols in the input box and pass them to servlet.From servlet I store
    > > it in the Database.
    > > When I do this it stores them as some jumbled chars in the database(
    > > when I use
    > > UTF-8 encoding in my HTML page) and '?' ( if I use ISO-8859
    > > encoding).
    > >
    > > Iam using java1.3 , windows 2000 and Oracle database.
    > >
    > > Any ideas ......

    >
    > Have you considered or are you using a suitable datatype such as BINARY or
    > flavors of the same?
    >
    > HTH,
     
    lareds, Nov 18, 2003
    #4
  5. (lareds) writes:

    > This is passed to the servlet, and I replace "u2122" with "%99"
    > and pass it to URLDecoder.decode() to convert it to ascii.


    That's not ASCII, but CP 1252 which Microsoft calls "Windows ANSI".
    Neither ASCII, ISO-Latin-1 or Unicode has a value at hex 99 (dec 153).
    In fact, there are no printable values between 128 and 159 (160, or
    %A0 is the non-breaking space, character above that value exist in
    both ISO-Latin-1 and Unicode).

    You need to tell whatever you use to display the char that the
    character set used is cp-1252.
     
    Tor Iver Wilhelmsen, Nov 18, 2003
    #5
    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. mrwoopey
    Replies:
    2
    Views:
    682
    bruce barker
    Jul 1, 2003
  2. Jonathan Wood
    Replies:
    1
    Views:
    511
    Jonathan Wood
    Jun 2, 2008
  3. Brad Tilley
    Replies:
    1
    Views:
    1,223
    Nobody
    Apr 3, 2011
  4. J P Singh

    Storing Currency Symbols in Database

    J P Singh, Jan 27, 2004, in forum: ASP General
    Replies:
    4
    Views:
    266
    Aaron Bertrand - MVP
    Jan 27, 2004
  5. joe
    Replies:
    0
    Views:
    112
Loading...

Share This Page