Hidden Special Characters in Variable

I am having a weird issue and for the life of me cannot figure out the root cause.  I have a query that is pulling back some data including a summed money data type from sqlserver called totalAmount.  We are looping over these rows and adding up some totals of the rows such as:
<cfset myAA = 0 />
<cfset myAB = 0 />
<cfloop ... >
<cfif ... >
<cfset myAA = myAA + getPayments.totalAmount />
<cfelse>
<cfset myAB = myAB+ getPayments.totalAmount />
</cfif>
</cfloop>
At this point we add the 2 together...
<cfset mySum = myAA + myAB />
We are expecting this to be 0, but in one instance it is not so, even though it should be.
Outputting the two variables gives them as -75.03 and 75.03.  When these are added together the result is:
-1.05160324892E-012
If I do a trim like:
<cfset mySum = trim(myAA) + trim(myAB) />
It returns 0.  So it seems there is an additional character on one or both of those variables, but what is it and where is it coming from?  If I output:
(#myAA#) + (#myAB#)
I get (-75.03) + (75.03).  So no whitespace... If I do a len() on each I get 6 and 5.
If I do a compare such as #myAA# => #(myAA eq "-75.03")#
I get -75.03 => NO, same with the other.
So I am dumbfounded, it seems there is a control character there that is hidden and throwing this off.  Anyone have any suggestions on what to check or any ideas what the problem may be?  I would rather fix the problem at the root rather than throwing trim() around variables that should be numeric to begin with.
-Shawn

BKBK's explanation is slightly wide of the mark, in mentioning that floats are all stored with an intrinsically high number of decimal places.
You misquote me. I didn't say intrinsic. I said arbitrary, twice even.
I am aware of binary representation and storage of numbers in memory. However, I intentionally kept the technicalities to a minimum, without losing the essence, so that it can make sense to Smholstein.
Whilst they can have a high number of decimal places, they don't automatically (1 will be stored with no decimal places; 1.5 will be stored with one DP, etc), and the "number of decimal places" is not really the correct way of looking at it.  For one thing, all numbers are stored in binary, not decimal, so there is no such thing as a decimal place.  A Double is 64-bit, which - if I'm reading the spec right, gives around 15 digits of decimal precision, and an exponent (of 10) range of 308 orders.  So this means one could express 123456789012345 or 0.123456789012345E-308.  But one could not represent 1234567890.123456: it's good too high a level of precision (16 digits; wherein a Double can only do 15).
Secondly, decimal fractions are not very easy to express in binary.  The only way binary has to express a number is in varying powers of 2, eg: 42 is  101010 in binary (32+8+2 or 1*2^5 + 0*2^4 + 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0).  When expressing fractions, it has to do the same thing.  2.5 is 1*2^1 + 0*2^0 + 1*2^-1. Easy.  But what about 2.3?  It's easy in decimal, but actually not possible to represent in binary (try expressing 0.3 only using sums of 2 raised to negative powers...).  So intrinsically, many many floating point numbers are not possible to completely accurately represent in binary; the computer can only make a reasonably good approximation by calculating it to a reasonable number of significant figures.  This means that under the hood, 2.3 might be represented as 2.3000000000000001 or something.  This is inate to floating point representation.
Brave attempt! However, there are far too many technicalities and intricacies about floating points than we have time or space for in this forum. It is sufficient to say that ColdFusion's underlying machine, Java, uses the IEEE 754 standard for representing floats and doubles. 
According to this standard, a  float is a single-precision, 32-bit floating-point number. Whereas a double is double-precision 64-bit floating-point number. A float requires up to 4 bytes of storage in memory, a double, 8 bytes. Floats have a precision of 23 binary digits, and doubles, 52.
Those are the limitations that make it impossible for the computer to represent, for example, 2.3 with exact precision. However, that doesn't mean that it is impossible to represent 2.3 in binary! It is infact possible to so, but it requires an arbitrarily large number of terms. Here it goes:
2.3 = 2 + 1/4 + 1/32 + 1/64 + 1/512 + 1/1024 + 1/8192 + 1/16384 + 1/131072 + 1/262144 + ...
Now, there's a vagary in CF that when one converts a floating point number to a string it internally "fixes" this approximation, so it'll convert 2.3000000000000001 to "2.3" as a string.  So if you output a float, it'll get "fixed", and if you use a float as an argument value for a string function (like trim), it'll also get "fixed".  That's why trimming your value seems to fix the problem.  It's really just a side-effect of the way CF converts floats to strings.
I think it's a bit more complicated than that. It can actually happen the other way round. That is, that ColdFusion may cast from the float 2.3 to the double 2.3000000000000001. That is what happened to Smholstein.
On the other hand, there are times when ColdFusion may round off numbers. This can happen, for example, if the number of digits after the decimal point exceeds, say, 12.
Run the following test. You will find that the 'fixing' you describe fails to work for y. The results are, respectively, 2.3 and 2.30000000001.
<cfset x = trim(2.300000000001)>
<cfset y = trim(2.30000000001)>
<!--- Add 0 to make ColdFusion convert to numbers --->
trim(2.300000000001) + 0 = <cfoutput>#x+0#</cfoutput><br>
trim(2.30000000001) + 0 = <cfoutput>#y+0#</cfoutput>

Similar Messages

  • Storing carriage return and other special characters in a TestStand variable and passing to LabVIEW

    I am using TestStand step to call a LabVIEW VI that writes commands to a serial device.  The device expects a carriage return at the end of the command.  I can create a constant string in TestStand with the carriage return, e.g., "ATA\x0D" and pass that to a LabVIEW string control which shows ATA\r and the VI works properly.
    To provide consistency and flexibility in my code, I want to store the terminator character(s) in a TestStand variable.  However, when I try to use an expression to create the command string, i.e. "ATA" + "Locals.Terminator", where Locals.Terminator is set to "\x0D", my LabVIEW VI string control shows "ATA\\x0D" which doesn't work.  And when I try Locals.Terminator set to "\r", the LabVIEW string control shows "ATA\\r" which doesn't work either.
    Is there a way to store special characters in a TestStand variable and pass them to LabVIEW as special characters?  I saw in another post that if you edit the TestStand variable by pressing Cntl-Enter, it will store  the newline \n properly and it can be sent to LabVIEW - that works for me as well for \n.  But  I need to send a carriage return.
    I've attached my test sequence and the corresponding LabVIEW VI with a string control.
    Hans
    Attachments:
    Special Chars.seq ‏27 KB
    String Passing.vi ‏13 KB

    Hi Hans, 
    Thanks for your detailed explanation and examples.  In TestStand, change the String parameter's String Type to Binary String instead of ASCII.  Then it will pass the desired value.
    Cheers,
    David Goldberg
    National Instruments
    Software R&D

  • FindNode returning Null And XML Not Accepting Special Characters

    Hi All,
    i am trying the get the attribute value in the element "ns4:InfoCFDi" using FindNode method, but the method is returning NULL. I used the same code for other sample as well and was successfull. but for this specific XML file(which is below) I am getting a Null.
    i can get till S:Body, but when i try to use FindNode for ":Body/s4:ResponseGeneraCFDi" I get Null value.
    And I used "S:Body/*[local-name()=" | "ns4:ResponseGeneraCFDi" | "]";
    as mentioned in other post but still no success.
    ==>I Have one more question relating to special characters. I need to use characters such as - ó in my XML to read as well as write. When I try to read i am getting XML parse error and when writing, i cannot open the file properly.
    Your help is much appreciated.
    My code is here:
    Local XmlDoc &inXMLDoc, &reqxmldoc;
    Local XmlNode &RecordNode;
    &inXMLDoc = CreateXmlDoc();
    &ret = &inXMLDoc.ParseXmlFromURL("D:\Agnel\Mexico Debit Memo\REALRESPONSE.xml");
    If &ret Then
    &RecordNode = &inXMLDoc.DocumentElement.FindNode("" );
    If &RecordNode.IsNull Then
    Warning MsgGet(0, 0, "Agnel FindNode not found.");
    rem MessageBox(0, "", 0, 0, "FindNode not found");
    Else
    &qrValue = &RecordNode.GetAttributeValue("asignaFolio ");
    Warning MsgGet(0, 0, "asignaFolio." | &qrValue);
    End-If;
    Else
    Warning MsgGet(0, 0, "Error. ParseXmlString");
    End-If;
    XML File:
    - <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    - <S:Body>
    - <ns4:ResponseGeneraCFDi xmlns="http://www.xxl.com/ns/xsd/bf/rxx/52" xmlns:ns2="http://www.sat.gob.mx/cfd/3" xmlns:ns3="http://www.xx/ns/bf/conector/1&quo t; xmlns:ns4="http://www.xx/ns/xsd/bfxx/xx/32&qu ot; xmlns:ns5="http://www.xxcom/ns/xsd/bf/xxxxx&q uot; xmlns:ns6="http://wwwxx.com/ns/referenceID/v1">
    - <ns3:Result version="1">
    <ns3:Message message="Proceso realizado con exito." code="0" />
    </ns3:Result>
    - <ns4:InfoCFDi noCertificadoSAT="20001000000100003992" refId="STORFAC20121022085611" fechaTimbrado="2012-10-22T08:56:45" qr=" "
    uuid="a37a7d92-a17e-49f4-8e4d-51c983587acb" version="3.2" tipo="XML" archivo="xxx" sello="B8WjuhYLouSZJ6LU2EjxZ0a4IKyIENZNBx4Lb4 jkcAk6wA+EM477yz91/iDdsON0jm8xibBfom5hvHsH7ZK1ps3NnAXWr1LW 7ctmGsvYKAMvkCx/yOVzJTKFM2hN+OqCTE0WVfgv690vVy2CDQWKlMxbK+3idwG4t OKCMelrN9c=" fecha="2012-10-22T08:56:44" folio="281" serie="IICC">
    <InfoEspecial valor="Este documento es una representacin impresa de un CFDI." atributo="leyendaImpresion" />
    <InfoEspecial valor="||1.0|a37a7d92-a17e-49f4-8e4d-51c983587acb|2012-10-22T08:56:45|B8WjuhYLouSZJ6LU2EjxZ0a4IKyIENZNBx4Lb4 jkcAk6wA+EM477yz91/iDdsON0jm8xibBfom5hvHsH7ZK1ps3NnAXWr1LW 7ctmGsvYKAMvkCx/yOVzJTKFM2hN+OqCTE0WVfgv690vVy2CDQWKlMxbK+3idwG4t OKCMelrN9c=|20001000000100003992||" atributo="cadenaOriginal" />
    <InfoEspecial valor="Doscientos dieciocho mil cuatrocientos setenta y cinco pesos 00/100 M.N." atributo="totalConLetra" />
    </ns4:InfoCFDi>
    </ns4:ResponseGeneraCFDi>
    </S:Body>
    </S:Envelope>
    TIA

    First of all you have to supply a value you want to search for and this has to be the complete path to the value. You're saying you already tried that, but can you paste the code which you used for that? I don't see the path mentioned in the code you posted.
    *FindNode*
    Syntax
    FindNode(Path)
    Description
    Use the FindNode method to return a reference to an XmlNode.
    The path is specified as the list of tag names, to the node that you want to find, each separated by a slash (/).
    Parameters
    Path
    Specify the tag names up to and including the name of the node that you want returned, starting with a slash and each separated by a slash (/). This is known as the XPath query language.>
    Another option would be this snippet of code:
    &InfoCFDiArray = GetElementsByTagName("ns4:InfoCFDi");
    &InfoCFDiNode = &InfoCFDiArray [1];
    &attValue = &InfoCFDiNode.GetAttributeValue("noCertificadoSAT")
    Warning(&attValue);
    It creates an array of XML Nodes which match the name "ns4:InfoCFDi". Since there's only one in the XML it's safe to assume it will be the one and only node in the array. I've assigned that node to the variable &InfoCFDiNode and use that to retrieve the attribute "noCertificadoSAT" value. The warning message should display the value supplied there.
    Concering the special characters; you will have to change the encoding of the XML. Peoplecode sets this to UTF-8 by default, but doesn't include this in the header. There's a little hack for that somewhere on the web, I'll see if I can find it.

  • Fields in Flat File are separated by special characters

    hello every one,
       fIf fields in Flat File are separated by special characters
    and If Flat File is given in Excel sheet , how to handle this kind of issues.
    to Upload data into R/3 system, in BDC.
       If u have sample program ,please send it ot me and explain ?
    others give me hints...

    Hi,
    you can use the function module ALSM_EXCEL_TO_INTERNAL_TABLE .
    Check this sample code.
    hi,
    use the FM ALSM_EXCEL_TO_INTERNAL_TABLE.
    PARAMETERS:
    P_INFL like RLGRAP-FILENAME.
    DATA:
    BEGIN OF T_DATA1 OCCURS 0,
    RESOURCE(25) TYPE C,
    DATE(10) TYPE C,
    DURATION TYPE P DECIMALS 2,
    ACTIVITY(25) TYPE C,
    B_NBILL(1) TYPE C,
    END OF T_DATA1,
    T_DATA TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE,
    BEGIN OF T_FINAL OCCURS 0,
    RESOURCE(25) TYPE C,
    DATE(10) TYPE C,
    DURATION(15) TYPE C,
    ACTIVITY(25) TYPE C,
    B_NBILL(10) TYPE C,
    END OF T_FINAL.
    DATA : HEADER TYPE XSTRING.
    Work Variables Declaration.
    CONSTANTS:
    W_Y TYPE C VALUE 'Y',
    W_N TYPE C VALUE 'N'.
    Work area.
    DATA:
    WA_DATA LIKE T_FINAL.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INFL.
    PERFORM GET_FILENAME CHANGING P_INFL.
    START-OF-SELECTION.
    PERFORM UPLOAD_DATA_FROMEXCEL.
    FORM UPLOAD_DATA_FROMEXCEL.
    Downloading the data from presentation server
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    FILENAME = p_infl
    I_BEGIN_COL = 1
    I_BEGIN_ROW = 2
    I_END_COL = 8
    I_END_ROW = 1000
    TABLES
    INTERN = T_DATA
    EXCEPTIONS
    INCONSISTENT_PARAMETERS = 1
    UPLOAD_OLE = 2
    OTHERS = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " upload_data_fromexcel
    *& Form process_data
    text
    FORM PROCESS_DATA .
    T_FINAL-RESOURCE = 'Resource'.
    T_FINAL-DATE = 'Date'.
    T_FINAL-DURATION = 'Duration'.
    T_FINAL-ACTIVITY = 'Activity'.
    T_FINAL-B_NBILL = 'Billable'.
    APPEND T_FINAL.
    SORT T_DATA BY ROW COL.
    LOOP AT T_DATA.
    CASE T_DATA-COL.
    WHEN 3.
    T_DATA1-RESOURCE = T_DATA-VALUE.
    WHEN 4.
    T_DATA1-DATE = T_DATA-VALUE.
    WHEN 5.
    T_DATA1-DURATION = T_DATA-VALUE.
    WHEN 6.
    t_data1-activity = t_data-value.
    WHEN 7.
    T_DATA1-B_NBILL = T_DATA-VALUE.
    ENDCASE.
    AT END OF ROW.
    COLLECT T_DATA1.
    ENDAT.
    ENDLOOP.
    LOOP AT T_DATA1.
    T_FINAL-RESOURCE = T_DATA1-RESOURCE.
    T_FINAL-DATE = T_DATA1-DATE.
    T_FINAL-DURATION = T_DATA1-DURATION.
    T_FINAL-ACTIVITY = T_DATA1-ACTIVITY.
    T_FINAL-B_NBILL = T_DATA1-B_NBILL.
    APPEND T_FINAL.
    ENDLOOP.
    ENDFORM. " process_data
    *& Form get_filename
    FORM GET_FILENAME CHANGING P_FILENAME.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = SPACE
    DEF_PATH = P_FILENAME
    MASK = ',. ,..'
    MODE = 'O' " O = Open, S = Save
    TITLE = BOX_TITLE
    IMPORTING
    FILENAME = P_FILENAME
    EXCEPTIONS
    INV_WINSYS = 1
    NO_BATCH = 2
    SELECTION_CANCEL = 3
    SELECTION_ERROR = 4
    OTHERS = 5.
    CASE SY-SUBRC.
    WHEN 1.
    MESSAGE I999 WITH
    'File selector not available on this windows system'(046).
    WHEN 2.
    MESSAGE E999 WITH
    'Frontend function cannot be executed in background'(047).
    WHEN 3.
    MESSAGE I999 WITH 'Selection was cancelled'(048).
    WHEN 4.
    MESSAGE E999 WITH 'Communication error'(049).
    WHEN 5.
    MESSAGE E999 WITH 'Other error'(050).
    ENDCASE.
    ENDFORM. " get_filename
    <b>Kindly Reward points if you found the reply helpful.</b>
    Cheers,
    CHAITANYA.

  • Need help in using replace function with special characters

    I have a column in a table where the data can contain ascii code for special characters such as an apostrophe.
    The data looks like this:
    CREEK&#39;S LANE
    ie for a street named CREEK'S LANE.
    I want to replace the ascii representation with the apostrophe and have the returned data show up as: CREEK's LANE
    When I try the query below I get prompted for substitution variable value.
    I don't seem to be able to find the right syntax to make this query work.
    SELECT REPLACE (street_name, '&#39;', '''')
    FROM
    streets WHERE street_id = 1
    Does anybody know how to do this?
    Any help would be much appreciated.
    Thanks.
    George

    george91 wrote:
    I have a column in a table where the data can contain ascii code for special characters such as an apostrophe.
    The data looks like this:
    CREEK'S LANE
    ie for a street named CREEK'S LANE.
    I want to replace the ascii representation with the apostrophe and have the returned data show up as: CREEK's LANE
    When I try the query below I get prompted for substitution variable value.
    I don't seem to be able to find the right syntax to make this query work.
    SELECT REPLACE (street_name, ''', '''')
    FROM
    streets WHERE street_id = 1
    Does anybody know how to do this?
    Any help would be much appreciated.
    Thanks.
    GeorgeHa! The codes you specified rendered in the HTML, but showed properly when I listed your original posting above. I didn't understand what you meant initially because the 5-character string represenation got rendered as the quote that you said you weren't able to get - a display problem.
    You're getting prompted for the substituon variable because of the ampersand; you appear to be doing this in SQL*PLUS. The first thing I would try is to SET DEFINE OFF when using the ampersands to see if that works. If That doesn't work check the docs to delmit the ampersand (I think its a backslash before it but can't remember offhand). Another, harder option might be to use the TRANSLATE function replacing the literal character instead of using REPLACE (though replacing a quote will be a little tricky). If you're on 10g also consider using the advanced quoting
    Good luck!
    Edited by: riedelme on May 22, 2009 12:45 PM

  • Reading special characters from a flat file and inserting into DB

    I'm reading data with special characters like . etc from a flat file , assigning the data to variable in my anonymous block and inserting into my DB. But the show up as inverted ? s. Any clues about how to do this?
    If i try to do the insert directly it works. It seems like the error occurs when reading this data into a variable
    thanks for the help
    Lalit Bhatia

    lalit, this is probably an character set problem, the default on Database creation tends to be 7bit Ascii which does not support special characters, it's been a while since I set up a db in this way, but you need to change settings in oracle.ini. The db will need to be restarted for this. Also, to check current settings try:
    select * from NLS_DATABASE_PARAMETERS
    You want an 8bit, unicode or multibyte character set. Sorry I cannot remember moer off the top of my head, try searching on NLS or character set

  • How to display special characters in APEX Classic Report column

    Ref: Thread: How to display newline characters as new lines
    Version: APEX 3.2
    Hi,
    I have created an classic SQL Report with one of the columns being a decode that gives a value 'Post'(the value should be highlighted in Red) on one condition and 'Pre' on another. I have followed the advice given in the page (URL provided above) , i.e. I have changed Strip HTML to 'No', changed Display as to 'Display as text (escape special characters, does not save state)'. I have also passed this value back to the same page to be stored in a page item each time a link (another column in report) in report is clicked. I have tried passing it as #DEADLINE# and \#DEADLINE#\. The issue I face is, instead of the value being highlighted in Red, it gets passed back as a string holding the value 'Post'. Is there any way I can get this to display as it should without the Strip HTML being changed to 'Yes'.
    Thanks very much.
    Rohi
    Edited by: Rohi on 18-Jul-2012 04:21

    876651 wrote:
    Hi,
    Thanks for your response.
    I am trying to display a page item that is derived from a report column based on a click on the URL link (*view >*>)
    This page item (here, it is Manager_ID) should ideally be highlighted when a particular condition is satisfied (achieved using a DECODE in the report).
    But it is not displayed like it should be.
    I do not want the value to be displayed along with the html tags as a string.
    I want the html tags to take effect and highlight the value within it.
    Initially, I had set Strip HTML to Yes and the value was returned without any highlighting .
    So I changed it to 'No' and and it contained the html tags.
    I am not sure what setting in APEX Report Attributes can help me achieve that effect I want.None of the report settings are relevant. They affect the rendering of the report and none of the columns you were changing the properties of were actually rendered.
    You can't pass HTML and CSS around in URL parameters.
    I suggest you pass *2* values in the column link: the MGR ID and a simple class or colour value computed by the DECODE in the report. I've suppressed the first version of the report and created a new one that does this:
    decode(dept.deptno, '30', 'c00', '000') highlight The link column now passes the MGR ID and the HIGHLIGHT colour (red when the condition is satisfied and black when it is not).
    I created another hidden and protected page item <tt>P0_HIGHLIGHT</tt> as the target for the highlight value, and used the Pre/Post Element Text properties of the <tt>P0_G_MGR</tt> to wrap it in a <tt>span</tt> whose colour is changed using the <tt>P0_HIGHLIGHT</tt> value as a subtitution string:
    <span style="color: #&P0_HIGHLIGHT.;">Having done that, I still don't really get the requirement here. I'm sure that given the full picture I'd be using a completely different approach...

  • How to extract special characters from a field

    Hi there.
    I am a novice when it comes to Web Intelligence reports. I have been tasked with producing a final report that I can export to Excel which shows a project number and a project name. Very simple. Ultimately I need to import my final Excel file to a third party software. However, the issue is the project name field consists of special characters such as hyphens, parenthesis, asterisks, etc. I need to be able to create a formula which extracts all special characters and just leaves me with alpha-numeric characters and spaces. I also need to limit the character count to no more than 34 characters. I will not be able to import my final Excel file unless I can product those results. With the help of a very knowledgable person in the Crystal Reports forum, I was able to do that by using the following formula:
    stringvar a:=left({Projects.ProjectName},34);
    numbervar i;
    Local StringVar fin;
    for i:= 1 to len(a) do
        if a[i]in ["a" to "z"] then
            fin := fin & a[i]
        else if a[i] in ["1" to "9"] then
            fin := fin & a[i]
    else if a[i] = " " then
         fin := fin & a[i];
    fin;
    It worked amazingly well in Crystal Reports but this report now needs to move to Web Intelligence. Is there a way to do this in a Web Intelligence report? Itried but the formula is not recogizable. I tried creating a variable and using this formual but I couldn't get it to work.  I appreciate all helpful responses. The version of Web Intelligence I am using is SAP Business Enterprise XI. I am working in a PC environment using Windows 7 if that helps at all.
    Thank you!
    Lauren

    Hi Lauren, Please provide with some sample data...
    In SQL, by writing some Functions/Procedures you can eliminate special characters. Ask your database team to do that.
    or
    Create an object with the following syntax... It Works in SQL.
    = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
    (REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
    (REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
    (REPLACE(REPLACE(REPLACE([String_Object],'&',' '),'*',' '),'(',' '),'^',' '),'%',' '),'!',' '),'@',' '),'#',' '),'$',' '),'~',' '),')',' '),'+',' '),'=',' ' ),'-',' '),'_',' '),'/',' '),':',' '),';',' '),',',' '),'<',' '),'.',' '),'>',' '),'?',' '),'"',' '),'''',' '),'[',' '),']',' '),'{',' '),'}',' '),'\',' '),'|',' ')
    Example: Input: '~!@#$%^&*()_+{}:"<>-=[]./\|/*-+ascdfv123'
                  Output: ascdfv123

  • Special characters in sender soap adapter provoke HTTP 500 error

    Hi,
    SAP R3 is sending a SOAP message to PI through SOAP adapter.
    When the payload does NOT contain german characters like ü, it works fine.
    However, when the payload DOES contain special characters, the SOAP adapter replies with an HTTP 500 code error.
    If I use SoapUI to send the soap message, and setting UTF-8 as the encoding in the program options, it will go through fine. If I change to ISO-8859-1 it will fail.
    I'm thinking in two options:
    - Make sure that SAP R3 sends the message in UTF-8 format (I think this is happening currently), as if SoapUI works, then probably R3 is not using UTF-8.
    - Force the adapter to use UTF-8. Is this possible? In the sender SOAP adapter I've added AF_Modules/MessageTransformBean (type local EB), and then Transform.ContentType for parameter name and --> text/plain;charset=utf-8 for parameter value. The sender adapter will fail then for every message, with or without special characters.
    Anyway, in this link (http://help.sap.com/saphelp_nwpi71/helpdata/EN/a4/f13341771b4c0de10000000a1550b0/frameset.htm) it seems to say that the sender soap adapter cannot be extended with modules, so maybe that's the reason why it fails when trying to add a module.
    Thanks

    If I use SoapUI to send the soap message, and setting UTF-8 as the encoding in the program options, it will go through fine. If I change to ISO-8859-1 it will fail.
    I'm thinking in two options:
    Check the use of option 1 ..... the URL which SAP is using to send the data can containe the encoding information.
    Check this SAP note: https://service.sap.com/sap/support/notes/856597
    From the above note:
    Q: What character encoding is supported by the SOAP sender adapter?
    +you can supply the encoding information with the xmlenc variable in the request URL as in+
    Regards,
    Abhishek.

  • Query to Handle special characters in the conditions

    Hi all,
    We have a table for colour codes and there related information but the colour codes have special characters in them like
    AL&.MPD
    CH(SB00
    ECA&BC1
    TD..0023
    0O'DON4
    i need to check if these exist in the table or not but when i query like
    select * from art.tb_color_code where color_code in ('AL&.MPD','CH(SB00','ECA&BC1','TD..0023','0O'DON4');
    i get prompts for entering the variable values there are 2500 such codes
    how do i negate the special meanings of these characters
    Regards
    Maverick

    Hi,
    If a string literal contains an apostrophe, use two consecutive apostrophes.
    For example:
    '0O''DON4'is a seven-character string. The third character is an apostrophe.
    As others have said,
    SET   DEFINE  OFFwill disable the special meaning of & in SQL*Plus.

  • Use of special characters in Search String

    What is the use of special charaters like
    in the search string in the Find & Replace of ABAP editor ?
    I want to search for all strings starting with V which are followed by alphabets like
    VA
    VB...
    If I use V*, it also gives me results like
    V/R...
    Whether it is possible to specify such a condition?

    Hi,
    While giving ur search in FIND & REPLACE,
    use the match case or match whole word only..
    Then u will get search results only where the exact case of that variable is used..
    As per my knowledge there is no signification of special characters ,- : ; in the search string..
    Hope this helps...
    Cheers,
    Simha.

  • Check on special characters

    In my program, on the selection screen a user can enter any variable except  special characters.How can I put a check on special characters??

    hi,
    In our key board, these many special characters present..
    so try your code like this..
    data: spe_char(31) value '~`!@#$%^&*()_+-=\|][{}";:,./?><'. ( include all
    special chars whatever u want)
    spe_char1 value ' '. ( this is to check empty space)
    spechar2. (this is to check single ' ).
    Create one text element and assign ' as value to that text element.
    in ur program code as given below.
    spechar2 = text-001.
    if (fieldname) CA spe_char.
    MESSAGE "special character is present in the given input
    endif.
    if ( fieldname) CA spe_char1.
    message "special character is present in the given input
    endif.
    if (fieldname) CA spe_char2.
    len = strlen( fieldname ).
    if sy-fdpos NE len.
    message "special character is present in the given input
    endif.
    endif.
    Hope this code will guide you ..
    regards
    vijay

  • Special characters in  a href

    Hi,I generate a html using JAXPs xslt transformer.
    One of the consists of Western european special characters(where pHREF is a xsl variable/param).
    while text printing, the special characters(�) are printed as they are, but are distorted when I want to generate a .

    Do you set the top element and its encoding attribute ?
    E.g.
    <xsl:output encoding="iso-8859-1">

  • Special Characters in a HTML region

    I recently upgraded from HTMLDB 2.0 to APEX 2.2 and I'm having trouble with some special characters.<br>
    <br>
    I have HTML region in which I display a hidden item. The hidden item (P1_TEST) has the following value:<br>
    <br>
    STRING1&lt;br&gt;STRING2&lt;br&gt;STRING3&lt;br&gt;<br>
    <br>
    The region source has a single reference to the hidden item:<br>
    <br>
    &P1_TEST. <- the period is there. :)<br>
    <br>
    In HTMLDB 2.0 the display in the HTML region would render the region as<br>
    <br>
    STRING1<br>
    STRING2<br>
    STRING3<br>
    <br>
    In APEX 2.2, the region is rendered as<br>
    <br>
    STRING1&lt;br&gt;STRING2&lt;br&gt;STRING3&lt;br&gt;<br>
    <br>
    which is obviously not what I want. <br>
    <br>
    Any ideas anybody? I must be missing something simple. :)<br>
    <br>
    Thanks, Kent

    Kent - This is explained here: Re: Computed Region TItles being Escaped in Apex 2.2 You can use an application item instead of a hidden page item as a quick solution. To continue to use a page item you can make its display type Display as Text (does not save state) and set its display condition to Never.
    Although this change from 2.0 to 2.2 necessitates this type of inconvenient program modification, the benefit is that a cross-site scripting vulnerability that existed in your application will now be corrected.
    Scott

  • Special characters in 10g dev

    I am using 10g dev. I am converting the reports from 6i. I have some values in DB using special characters ie. for deg C (instead of deg i use o ) . now when I display it on PDF it shows as a junk character. How can we solve it. while I was using Oracle 6i this was displaying properly.
    Thanks
    MG

    Hi Con,
    For the case of worksheet script, the special characters work fine for me in 3.2.20.09.87. What version are you on?
    When running the query from the Reports view, here are a couple of hints
    1. In the report's SQL Query definition, use Style: Script, not Table
    2. Edit your SQL Query to use bind variables, not substitution variables, like so...
    select ' Action:' || :V_PATCH || ' ' || :V_ACTION || chr(10) ||
    'Database: '|| instance_name || chr(10) ||
    ' Date: '||to_char(sysdate,'DD-MON-YYYY HH24:MI') || chr(10)
    from v$instance3. Finally, define them in the Binds section.
    Hope this helps,
    Gary

Maybe you are looking for