Solved

Euro €  Parsing Problem with 9ias

Posted on 2004-10-21
315 Views
Last Modified: 2013-12-01
Hi all,
I'm having a problem with an XML parsing. I'm taking an incoming mail and using java stored in the DB i get hold of an XML attachment to an email an begin parsing it with oracle.

The problem is that when the XML file contains a euro symbol, the parser crashes. I  have isolated it as being the euro € symbol, as when it is removed, the XML file is parsed perfectly. Below is the v$nls_parameters table for the database i'm using.

NLS_LANGUAGE                        ENGLISH

NLS_TERRITORY                        IRELAND

NLS_CURRENCY                        $

NLS_ISO_CURRENCY                  IRELAND

NLS_NUMERIC_CHARACTERS            .,

NLS_CALENDAR                        GREGORIAN

NLS_DATE_FORMAT                  DD-MON-RR

NLS_DATE_LANGUAGE                  ENGLISH

NLS_CHARACTERSET                  WE8MSWIN1252

NLS_SORT                              BINARY

NLS_TIME_FORMAT                        HH12:MI:SSXFF AM

NLS_TIMESTAMP_FORMAT                  DD-MON-RR HH24:MI:SSXFF

NLS_TIME_TZ_FORMAT                  HH12:MI:SSXFF AM TZR

NLS_TIMESTAMP_TZ_FORMAT            DD-MON-RR HH24:MI:SSXFF TZR

NLS_DUAL_CURRENCY                  €

NLS_NCHAR_CHARACTERSET            AL16UTF16

NLS_COMP                              BINARY

NLS_LENGTH_SEMANTICS                  BYTE

NLS_NCHAR_CONV_EXCP                  FALSE

Any suggestions would be greatly appreciated, and thanks in advance.
0
Question by:g00334120
    12 Comments
     
    LVL 13

    Expert Comment

    by:petmagdy
    In case of special characters into XML tag values use ! [CDATA like this:

    <language-name>
     <![CDATA[€]]>
    </language-name>



    0
     
    LVL 1

    Author Comment

    by:g00334120
    Not to reveal my ignorance but could you be a little more specific please, the € symbol is contained in the data between tags, where should i place

    <language-name>
     <![CDATA[€]]>
    </language-name>

    Thanks.
    0
     
    LVL 13

    Expert Comment

    by:petmagdy
    Yes I know u mean data between tags please try it and lets see
    0
     
    LVL 1

    Author Comment

    by:g00334120
    No luck petmagdy,
    Any other suggestions?
    Thanks.
    0
     
    LVL 13

    Expert Comment

    by:petmagdy
    yes instead of € insert &#x20AC
    0
     
    LVL 1

    Author Comment

    by:g00334120
    I'll try that thanks. The laptop that DB is on is currently out of my possession. I'll let you know as soon as get it back.
    Thanks.
    0
     

    Expert Comment

    by:radical_mit
    one other idea ,I had, a problem but with Swiss letters, was to change the NLS_LANG oracle settting to
    WE8ISO8859P1

    this fixed my äöé problem as well as thje € symbol one. maybe this helps

    0
     
    LVL 1

    Author Comment

    by:g00334120
    Cheers,
    I'll give that a try too.
    0
     
    LVL 1

    Author Comment

    by:g00334120
    Sorry for the delay,
    Still no luck.
    0
     
    LVL 13

    Expert Comment

    by:petmagdy
    ahhhh you don't get my point i mean to replace the euro sign (€) with the Hexadecimal value (&#x20AC) inside the XML iteself not the v$nls_parameters table
    0
     
    LVL 1

    Author Comment

    by:g00334120
    No, i did that and had no joy. It just complained about more illegal characters. Could it be a problem with the 9i xml parser?
    0
     
    LVL 13

    Accepted Solution

    by:
    Ok it seems u need to encode url XML as UTF-16

    u still put &#x20AC  or &#8364 in the xml,

    see the accepted answer at this thread URL:

    http://www.experts-exchange.com/Web/Web_Languages/XML/Q_20302545.html
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    -Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
    This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
    Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now