Convert a CLOB with WE8ISO8859P15 Charset UTF - 8 charset

Hi all

I have a CLOB containing an XML and XML code all tags where created using the DB character set: WE8ISO8859P15.

For example:

{code}

<? XML version = "1.0" encoding = "ISO-8859-1? >

" < certidao xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance ">

< funcionario >

< Name >José Moreira < / name >

< language > head of the Administration Office < / language >

Faculty of engineering < instituição > < / instituição >

MANAGER ADMINISTRATIVE < assinatura > < / assinatura >

< title > < / title >

< / funcionario >

< / certidao >

{code}

I need to keep this charset value.

But now I need to convert all my CLOB data in charset UTF-8 for external requirements and stored this new CLOB in a table column.

I can't change the character set of the session. I tried to use a function

{code}

FUNCTION convert_xml (pcl_xml IN CLOB)
RETURN THE CLOB
IS
lcb_return CLOB.
BEGIN
SELECT CONVERT (pcl_xml, "WE8ISO8859P1", "AL32UTF8")
IN lcb_return
FROM DUAL;

RETURN lcb_return;

END convert_xml;

{code}

This function apparently works, but when I try to validate the XML content (once I replaced the encoding = "ISO-8859-1" for encoding = 'UTF-8') the validation software tells me that I have some characters that should not be present in a file using the UTF-8 encoding.

Any help?

Thanks in advance.

Filipe Almeida

I had an error in my service.

Should be

SELECT CONVERT (pcl_xml, "AL32UTF8", "WE8ISO8859P1")
      IN lcb_return
      FROM DUAL;

Thanks anyway.

Filipe

Tags: Database

Similar Questions

  • How to convert .vi .exe with the student LabView version

    Hello

    I would like to know if it is possible to convert .vi .exe with the student Labview version.

    Thank you

    N ° if I remember correctly, your license agreement specifically prohibits this. You would have to buy the professional version of LabVIEW. No real need for a student to create an exe file.

  • PDF documents converted into Word with ExportPDF are secure?

    PDF documents converted into Word with ExportPDF are secure?

    Hi stonermarker,

    Please see this thread on the security of the documents on service online ExportPDF: Adobe ExportPDF security

    Best,

    Sara

  • How to convert a SQL with variable

    Can Hello, please how I convert the underside with a dominant

    I need to be able to generate a plan to explain it, I think I should use cast.



    SELECT TO_NUMBER (OIL. REBALANCE_ORDER_ID UNIQUE_ID),
    OIL. ORDER_QTY,
    OIL. ORDER_TYPE,
    OIL. ORDER_SIDE,
    OIL. POSITION_TYPE,
    OIL. AVAILABLE_QTY AVAILABLE_QUANTITY,
    OIL. GROSS_AMOUNT ORDER_AMT,
    OIL.NET_AMOUNT NET_AMOUNT,
    OIL. FEE_AMT FEE_AMOUNT,
    OIL. ACCRUED_INTEREST_AMT ACCRUED_INTEREST
    TABLE (: B6) OIL

    >
    I need to be able to generate a plan to explain it, I think I should use cast.

    SELECT TO_NUMBER (OIL. REBALANCE_ORDER_ID UNIQUE_ID),
    OIL. ORDER_QTY,
    OIL. ORDER_TYPE,
    OIL. ORDER_SIDE,
    OIL. POSITION_TYPE,
    OIL. AVAILABLE_QTY AVAILABLE_QUANTITY,
    OIL. GROSS_AMOUNT ORDER_AMT,
    OIL.NET_AMOUNT NET_AMOUNT,
    OIL. FEE_AMT FEE_AMOUNT,
    OIL. ACCRUED_INTEREST_AMT ACCRUED_INTEREST
    TABLE (: B6) OIL
    >
    You're right - mount the bind as the appropriate type. I have a SQL type named emp_table_type so that it works

    explain plan for select * from table(cast (:e1 as emp_table_type))
    

    The models involved are

    CREATE OR REPLACE TYPE SCOTT.emp_scalar_type as object
      (EMPNO NUMBER(4) ,
       ENAME VARCHAR2(10),
       JOB VARCHAR2(9),
       MGR NUMBER(4),
       HIREDATE DATE,
       SAL NUMBER(7, 2),
       COMM NUMBER(7, 2),
       DEPTNO NUMBER(2)
      )
    /
    
    CREATE OR REPLACE TYPE SCOTT.emp_table_type as table of emp_scalar_type
    /
    
  • How to convert a PDF with handwritten signature?

    How to convert a PDF with handwritten signature?

    Hi Lotus1215,

    Once the document is signed this document, we can edit, where the conversion is not possible

    Please see the article mentioned below

    http://forums.Adobe.com/docs/doc-1515

    I would like to know if you have any further questions.

    Kind regards

    ~ Dominique

  • Can I convert a server with software RAID with cold clone CD?

    I have a win2k3 server that has two disks (RAID 1 software), I can convert the server with software RAID with cold clone CD?

    Yes

    ___________________________________

    VMX-settings- WS FAQ -[MOAcd | http://sanbarrow.com/moa241.html]- VMDK-manual

  • Convert previously converted from raw with Adobe DNG converter files?

    It seems that I'm not able to convert my raw files that have already been previously converted to DNG with the dng converter.  I am wanting to start editing everything new with the raw image, but before I can start editing a raw image, I have to convert it to a .dng.  Why doesn't the converter program let me convert the raw file again and give me the opportunity to appoint differently than the first file?  What I am doing wrong?

    If not, is it possible I can say ACR (whether in bridge or photoshop) to get rid of all the changes made on the first converted .dng file and start over again with image in camera?

    Thanks for any help!

    I don't know why your DNG Converter has stopped working.  You have successfully updated to a later version?  But you don't need to go through this process again.  In Bridge, just click on the images and there is an option to reset the Camera Raw settings.  Or, inside of Camera Raw, press the Alt key and a button will change to "Reset".  In both cases, all the camera raw settings are erased, giving you the image as it has been downloaded.

  • How to convert files or strings ANSI to UTF - 8?

    I have a program that reads a file line by line and writes to the other. If the original file is in ANSI format, then the result is ANSI as well, and if the original is UTF - 8, the resulting as well. How can I change this behavior so that all output files are coded with BOM or without UTF - 8?

    Hello user,.

    Read the file with ascii: InputStreamReader (InputStream, Charset)
    API: http://download.oracle.com/javase/1.5.0/docs/api/java/io/InputStreamReader.html#InputStreamReader%28java.io.InputStream, %20java.nio.charset.Charset%29

    Write the file UTF - 8 = OutputStreamWriter (OutputStream, Charset)
    API: http://download.oracle.com/javase/1.5.0/docs/api/java/io/OutputStreamWriter.html#OutputStreamWriter%28java.io.OutputStream, %20java.nio.charset.Charset%29

    Thank you.
    Narayan

  • CLOB with special characters

    We have recently updated our database from a character set to UTF8. Since then, a function of database using DBMS_LOB. SUBSTR to return 4,000 characters both stopped working when the text contains special characters (accents, tilda, etc.). I know that our DBA converted all the fields of VARCHAR2. For example, he changed a field with the data type of VARCHAR2 (10) to VARCHAR2 (10 char). Is there a similar conversion to CLOB fields?

    user2486268 wrote:
    The problem may be the function itself. This is the code:

    My first thought was that I had to change v_return_answer VARCHAR2 (4000) to v_return_answer VARCHAR2 (4000 tank). I tried, but it made no difference. Here's an example of what look like parameters in the function call:
    SELECT f_get_long_answer (1307003,2,15,'L1',1)
    OF THE DOUBLE

    When there is a special character in the area of the sarquan_long_answer, he gets this Oracle error:
    ORA-6502: PL/SQL: digital or value error: character string buffer too small.

    I think that you already have the position in the right direction - your problem is that the DBMS_LOB. SUBSTR function is now trying to copy the 4,000 characters in your field of VARCHAR2.

    Many characters with your UTF8 characters will now allocate more than a single byte.

    So if you need to change the local variable to semantics (4000 tank) TANK if not changed a default of your DBA (parameter NLS_LENGTH_SEMANTICS) - but there is a limitation in Oracle that SQL can manage up to 4 000 bytes VARCHAR2 (PL/SQL can handle up to 32767 bytes in the latest versions of Oracle) - and if you try to copy the 4,000 characters in your local variable it will succeed to within the service, if the variable is defined as char 4 000, but it will fail to return the value of SQL.

    So I assume you are using this function in SQL and then fails with this error message if you try to use SQL from whenever the local variable is greater than 4 000 bytes. If your local variable is defined with the semantics of character then he must really succeed if you use from within PL/SQL, provided the variable that will receive the return of the value function is also defined to be big enough.

    Since a single character in UTF8 can allocate up to 4 bytes you can only assume back up to 1,000 characters now that SQL function, is over 4,000. Everything from 1 001 to 4 000 characters can potentially fail now in the SQL engine.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    Co-author of the book "OakTable Expert Oracle practices":
    http://www.Apress.com/Book/view/1430226684
    http://www.Amazon.com/Expert-Oracle-practices-database-administration/DP/1430226684

  • My photos has been converted on iphotos with El Capitan, but now it will only download my new pictures taken on my iphone. I've updated all my storage so it's not the question.

    You wonder how to synchronize photos with pictures of the iphone.

    All my new photos as soon as I converted from iphoto pictures is no longer automatically synchronize my camera roll photos.

    He said (download 20 543 points 402 62 GB MB) for 3 days now with no new downloads.

    I had to leave the program and restarted-still nothing. It has not updated since May 19

    What are your iCloud on the phone and on the Mac settings in he System Preferences and preferences of Photos?

    LN

  • How to convert a video with Playmemories Home (latest version 3.03)

    Hello

    I have a Camcorder HDR-CX580V to work.

    I am running W7 64 bit.

    I installed everything first LIte version by following the instructions manual (the camera was always plugged USB).

    I have couple of movies (mpeg/m2ts) to a different resolution (HD and STD)

    With the version lite, I see that editing/conversion, I have the WMV and MPEG-2 conversion option.

    But I can not used (they are light gray shade).

    So I decided to upgrade to the full version.

    After the upgrade, the only format conversion option I have is MP4?

    I don't have a choice of MPEG-2?

    Then, when I try tho convert with the only choice (MP4) and the abandonment of the process of conversion after 1 second.

    After a lot of waste hours trying to understand and find information about the problem (interference of codecs), I decided to install on another computer same PMH result.

    The camera at home and try the installation process on my personal computer.

    Always have the only choice of codec MP4 but this time I managed to convert the m2ts/mpeg file to mp4.

    But I'm still confuse the process.

    I had a registered STD (720 x 480) mpeg movie and once converted mp4 it's now stretche (ugly) 1920 x 1080.

    No idea why it doesn't work and why I am so limited in the conversion option?

    Should I buy third-party converter/dvd burner?

    Thank you

    I have the same problem. When I try to convert mpeg files (saved in this format by my camera DCR-SR35), after a short time, I get an error message saying that the conversion to mp4 can be due to an error. other formats are not present as an option.

  • LabVIEW Embedded for ARM - convert to hexadecimal with backslash prior to ASCII

    -LV 2010 with Embedded for ARM module

    -MCB2300

    -COM1 port

    I'm reading in a string of series on this port to a serial device. I'm (for some reason any) read in hexadecimal characters. I can read a byte at a time or all the bytes in the port.

    My chain to come looks like this:

    \D5\8B\D6\EC\AB\D6\EC\FB\F6\FB\F6\EBV\D6\EC\EB (if I read in all at once)

    or

    \DB

    \8B

    ... (if I read in one byte per iteration)

    Anyway I want to convert it to ASCII characters but I can't get the ' \' off at the front of the string. I tried both ways and no work. The outputs are just empty. Any suggestions?

    surprisingly, when I change the 1 to 0 (i.e. Remove) it works.

  • Saving the JSON files with Notepad in UTF-8 format causes error in Unflatten of JSON VI

    After doing a flatten to JSON and write in the text file, I open the file in Notepad and edited one of the fields. Then I registered under and marked 'UTF-8 '. The function JSON Unflatten fails with the 375003 error "the JSON string is not valid. The JSON strings must be encoded in UTF - 8 and must conform to the JSON grammar.

    I did change the numerical value in the field. Does Notepad save not a 'real' UTF-8 file? Someone else had this problem? Which makes it pretty hard to let users to change if the software cannot read it.

    Notepad adds a BOM header said at the beginning of the text file. This indicates a conscious drive UTF UTF type so boutien multibyte UTF encodings (e.g. UTF-16, UTF-16BE, UTF-32). Unfortuntaly notebook is so 'smart' to do it seamlessly and without any notification.

    If you use Notepad ++, or any other smarter text editor, you can avoid this problem of having this BOM autmagically added to the file to save.

    Basically, UTF - 8, you get three codes hexadecimal 0xEF, 0xBB, 0xBF at the start of the file. You can read the file yourself and check these three characters in this order and remove them if they exiist, before passing the string to your string in JSON format Unflatten and everything should be good.

    See here for more details on the UTF BOM.

  • How to convert the string with numbers in the table of Boolean 2D

    Hello

    I have input a string with comma separated numbers 1,192 (starting at 1).

    This string must be converted to a table 2D-boolean. Each number that appears should be true, not true rest.

    The 2D table consists of 4 times of 0.47 Boolean values.

    1.48--> [0.47] numbers [0]
    49.96--> [0.47] numbers [1]
    Numbers 97.144--> [0.47] [2]
    145.192--> [0.47] numbers [3]

    If a '1, 49, 97 145' input string put all [0] [0.3] true.

    How can it be easy/fast resolved?

    Thanks for help

    Break the string of numbers in a table of numbers.  (Spreasheet String to Array).

    In a loop For, index with each issue of this table.  Use in the range and Coerce to see if it is in the range of numbers.  (You can put this in a loop For as auto good indexing through the ranges).  If it's in the range, then use subset replace table to activate the corresponding item in a real.  If this is not the case, do nothing.  Maintain the table of Boolean in a shift register.

    Repeat this step for each number in your table.

    (What is a class assignment?)

  • How to convert the string with numbers in U8 with ascii

    Hello

    I have a string with only numbers 0. 9 paper.

    Now, I want to convert to table-U8.

    He works here, but now the problem: How can I change each character to its ascii value?

    Example:

    entry: 123 (string)

    output: x 31, x 32, x 33 (U8-array)

    Thanks for the help

    It's very easy

    String to Byte Array Function
    Have the Palette: string/array/path Conversion functions

    Converts a string to an array of unsigned bytes. Each byte in the array has the ASCII value of the character corresponding to the string.

Maybe you are looking for

  • hardware 3F0 problem

    Well I am running win 8 on my new laptop so I can't seem to find the solution in the forum. I did all the Coachman who said he passed.I made the long and short of the hard drive version that smart and main test successful.I have it out and reconnect

  • Three weeks ago, I can't receive anything not yet junk or spam, but I can send emails

    original title: not receiving emailsI get my normal mail for many years, but as three weeks ago, I can't receive whatever it is not junk or spam, but I can send emails, does anyone know what could be wrong

  • LL780 - Media does not automatically starting from tray 2

    I have a L7780 using Vista, XP and MAC OS. When Tray 1 is empty, the printer does not automatically draw/pull out tray 2. I get a condition "on paper." I have reset the printer to set up factory and have re-installed the latest drivers from the compu

  • Why my ascer aspire laptop have a constant flashing red light

    My acer aspire laptop has a red light on the side of the switch off market which continuously flashes. Anyone know why this is happening. It started two days ago?

  • Hyper-V NIC legacy

    I have WIN2K8R2 + Hyper-V role in Cisco UCS B200M2 with the card NETWORK M81KR model This NIC is 10 GB, but when I create Legacy NIC pxe in child vm, I get only 100 MB. The parent NIC is Cisco M81KR but why, once I created Legacy nic, it shows like I