dbTalk Databases Forums  

insert with entity recognition

comp.databases.oracle.server comp.databases.oracle.server


Discuss insert with entity recognition in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
okey
 
Posts: n/a

Default insert with entity recognition - 08-16-2010 , 02:36 PM






unicode database setup 10g

&#0174 is a copyright symbol

How can we make insert entity encode on the fly?, as in

insert into product (title) values ('&#0174');

We want the actual copyright symbol to show, not the &#0174.
Inserting/updating from the application server is no problem, we
entity encode there.

(ps - we get the insert scripts like this)

thank you.

Reply With Quote
  #2  
Old   
Robert Klemme
 
Posts: n/a

Default Re: insert with entity recognition - 08-16-2010 , 04:17 PM






On 16.08.2010 21:36, okey wrote:
Quote:
unicode database setup 10g

&#0174 is a copyright symbol

How can we make insert entity encode on the fly?, as in

insert into product (title) values ('&#0174');

We want the actual copyright symbol to show, not the&#0174.
Inserting/updating from the application server is no problem, we
entity encode there.
IMHO entity replacement should be made by some application way up closer
to user input. If your DB is Unicode anyway then the entity accepting
user input would be the proper location to convert this to Unicode text.
That makes your DB handling much more independent of input channels
and you can even use it with several different input sources.

Quote:
(ps - we get the insert scripts like this)
What do you mean by this? Are you saying that you cannot get other
input? If you can't the proper solution would be to do the conversion
on the scripts, i.e. parse them replace those entity codes with Unicode
characters and then feed the modified script into the DB. However, this
is certainly more expensive than doing it elsewhere (see above) plus:
how do you know that what you see is actually an entity or meant to be
inserted into the DB as is?

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Reply With Quote
  #3  
Old   
yossarian
 
Posts: n/a

Default Re: insert with entity recognition - 08-17-2010 , 07:18 AM



okey wrote:

Quote:
&#0174 is a copyright symbol
Actually, it's the "registered trade mark" symbol.

Quote:
How can we make insert entity encode on the fly?, as in

insert into product (title) values ('&#0174');
You have to use the Unicode exadecimal character number code, i.e.:

insert into product (title) values (unistr('\00AE')) ;

HTH

Y.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.