Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Losing extended characters in procedure with WE8MSWIN1252 configuration

Losing extended characters in procedure with WE8MSWIN1252 configuration

From: Kurtis <KJKyle_at_coolblue.com>
Date: 12 Oct 2004 11:49:41 -0700
Message-ID: <dcd31cd0.0410121049.4f645622@posting.google.com>


We have a Visual Basic COM+ application that receives input from an ASP page on IIS 5.0 / Windows 2000. The code page is 1252 on this box.  Within the COM+ DLL, we establish an ADO connection to Oracle using the "Oracle Provider for OLEDB". The NLS_LANG is set to AMERICAN_AMERICA.WE8MSWIN1252. The NLS_CHARACTERSET is WE8MSWIN1252 which matches the COM+ client.

The COM+ DLL calls a stored procecure with 2 parameters. ( one input the other output ... request/reponse style ) Now, we've created a utility procedure, ProcessRequestXML, that simply executes a CONVERT on this incoming XML with the database characterset. If we do not call this ProcessRequestXML proc, extended characters such as õ, õ, €, etc get lost and become upside-down question marks when sent to another procedure to be committed. Although this utility procedure does not make much sense since the source and destination charsets are the same, it does work allowing the program to save extended characters. I have no idea why?

Can someone explain what is going on ? I've studied NLS configuration extensively and I have a pretty good understanding of it according to the documentation. I believe the data coming from the DLL should be 1252 encoded. I've tried using the DUMP function (dump(to_char(requestXML) , 1016) ) to verify what the characters codes are. I get bf ( upside down question mark ) before I call ProcessRequestXML and the correct code (80 for Euro for example) after the call to ProcessRequestXML, so ProcessRequestXML seems to straighten the problem out.

See 2 example procs below :

 PROCEDURE csp_PutData(requestXML IN OUT clob, responseXML IN OUT clob ) AS
  BEGIN         ProcessRequestXML(requestXML);

  END csp_PutData(requestXML

PROCEDURE ProcessRequestXML(requestXML IN OUT CLOB) AS   

    vcDBCharSet VARCHAR2(255);   

  BEGIN      SELECT VALUE
    INTO vcDBCharSet
    FROM V$NLS_PARAMETERS
    WHERE parameter = 'NLS_CHARACTERSET';   

    requestXML := CONVERT(requestXML,

                          vcDBCharSet,
                          vcDBCharSet);
  

  END ProcessRequestXML; Received on Tue Oct 12 2004 - 13:49:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US