469,306 Members | 1,958 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

Special characters in java, oracle and html

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.
Jul 17 '05 #1
3 16848
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

Jul 17 '05 #2
bb*@africamail.com (Barry Olly) wrote in message news:<27**************************@posting.google. com>...
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
Jul 17 '05 #3

"Barry Olly" <bb*@africamail.com> wrote in message
news:27**************************@posting.google.c om...
| 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.

Hi Barry, we have encountered this problem before. It is to do with the
character encoding which is used. I can't remember our exact fixes, but if
you look at the API & check out the String class & encodings (or charsets)
you should be able to fix most of it. Oracle databases also use special
escape characters, but the escape character needs to be turned on or
enabled. See your DBA, or if that's you also have a hunt about in the
documentation, if you use TOAD, there is a menu option (somewhere) to enable
it.

HTH
--

Paul
pa**@javacoda.com
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Dario Di Bella | last post: by
4 posts views Thread by kenneth.osenbroch | last post: by
7 posts views Thread by Trac Bannon | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.