Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » NCLOB_CONVERSION (oracle 9i, unix)
NCLOB_CONVERSION [message #454434] Wed, 05 May 2010 10:02 Go to next message
mike15
Messages: 16
Registered: May 2010
Junior Member
Does anyone have have a routine that does conversion for data stored in NLCOB (UTF16) to BLOB type.
Re: NCLOB_CONVERSION [message #454435 is a reply to message #454434] Wed, 05 May 2010 10:16 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
NCLOB is characters, BLOB is binary, which kind of conversion do you want to make? Only you can answer this, there are many ways to convert it.

Regards
Michel
Re: NCLOB_CONVERSION [message #454438 is a reply to message #454434] Wed, 05 May 2010 10:23 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Have a look at DBMS_LOB.CONVERTTOBLOB procedure.

Regards
Michel
Re: NCLOB_CONVERSION [message #454445 is a reply to message #454434] Wed, 05 May 2010 10:55 Go to previous messageGo to next message
mike15
Messages: 16
Registered: May 2010
Junior Member
I tried CONVERTTOBLOB procedure but i got a characer set error mismatch error because NCLOB was UTF-16 and BLOB was ISO88591 (db character set).

I want to download a file using mod_plsql and it only supports BLOB files. I want to store the data in NCLOB to get the unicode format and then convert to binary which would be representation of unciode instead of iso88591.
Re: NCLOB_CONVERSION [message #454446 is a reply to message #454445] Wed, 05 May 2010 11:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
BLOB was ISO88591 (

No! BLOB is BINARY nothing related to character set.

Quote:
I want to download a file using mod_plsql and it only supports BLOB files.

I don't exactly what you want to do and can do but if "download files" is really your thing then you can write your NCLOB into a file and then make it download.

Regards
Michel
Re: NCLOB_CONVERSION [message #454457 is a reply to message #454446] Wed, 05 May 2010 12:03 Go to previous messageGo to next message
mike15
Messages: 16
Registered: May 2010
Junior Member
yes, but I beleive Binary representation for a single-byte encoding (ISO8859) is different than Binary representation for multi-byte encoding scheme (UTF-16). If you have one character represented by 2 bytes in UTF-16 it will have a binary set for each byte while the ISO8859 will have one set.

I see what you are saying about creating a file. The problem is that the server is behind a firewall and teh file would not be accessible. They are also blocking mounts to a server outside firewall. So i want a table solution where it is stored/downloade from a table via mod_pslql. i am using WPG_DOCLOAD to download the file and it only supports BLOB.
Re: NCLOB_CONVERSION [message #454458 is a reply to message #454457] Wed, 05 May 2010 12:09 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Binary is binary (bits are bits).
Binary is a string of ones and zeros.
Exactly how the 1 & 0 are interpreted is a function on the application which created them & accesses them.
Re: NCLOB_CONVERSION [message #454459 is a reply to message #454457] Wed, 05 May 2010 12:12 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
yes, but I beleive Binary representation for a single-byte encoding (ISO8859) is different than Binary representation for multi-byte encoding scheme (UTF-16).

Yes but this is irrelevant to the fact that BLOB are strictly binary data and doesn't if what you stored is string, image, video, music and so on. Will you say that music in BLOB is in ISO8859 code? This is meaningless.

I move the topic in "Application Express & MOD_PLSQL" forum you have a better chance to get an answer in this forum.

Regards
Michel
Previous Topic: using external table
Next Topic: PSP pages
Goto Forum:
  


Current Time: Thu Mar 28 12:53:59 CDT 2024