Handling Special characters in the data set

Hi All,
I am facing an issue in hadling special characters while writing data to a flat file.
The data fetched in toad query is *44CAÑADO* (with some specail character over N), but when this same data is written in textpad using UTL_FILE.put_line, the data written is converted to *44CAÑADO*.
Can anyone please help me how to handle these special charatcers so that the same data is written in text file as well.
Regards,
Shruti

To find the database characterset, please see (Character Sets & Conversion - Frequently Asked Questions [ID 227330.1] -- 2. What is the database character set used for and how is it set?)
For your issue, please see these MOS docs.
UTL_FILE Adds ^U (Control U) NAK Character At the End of the Line. [ID 604150.1]
Character set conversion when using UTL_FILE [ID 227531.1]
NLS_LANG Explained (How does Client-Server Character Conversion Work?) [ID 158577.1] -- 5.8 UTL_FILE is writing / reading incorrect characters.
Thanks,
Hussein

Similar Messages

  • Handle special characters in the attribute name

    Hi,
    I am generating different view element in WD application dynamically. How to handle special characters other than '-/ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789'  for the attribute name dynamically?
    Thank you, in advance.
    Trupti

    Going with the obvious response - don't use them?
    if you're using dynamic code, there is no reason (other than debug support) to give your created elements any meaningful name.
    Just generate a GUID for each new element and use that.
    If you need to be able to later search for and update the element a simple lookup table of GUID to reference string should work reasonably well.
    Cheers,
    Chris

  • 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.

  • Problems with special characters in the data.

    Hi All,
    Whenever, I'm trying to data such as "Lämmerzunge" which are having some special characters in it, it is storing them as L�mmerzunge. Is there anyway to handle these?
    Thanks in advance.
    Regards,
    Venky

    Check if database characterset supports these special characters
    check client's nls settings.
    check client machine's language settings (converts characters in driver level)

  • Time-dependent Vendor Master & Handling Special Characters

    Hi,
    I need to extract time-dependent Vendor Master.
    1. The data source for <b>0VENDOR</b> does not have fields to hold the valid date range.
    2. Does the Master data in R/3 for Vendors will hold the valid date range?
    3. The text for <b>0VENDOR</b> provides time-dependent, but how to map the <b>valid from</b> and <b>valid to</b> fields?
    Handling Special Characters:
    We are trying to extract data from Legacy system via DB Connect. The item text field consists of special characters. Of course in BW customization we can specify all the special characters to consider. But the special character we observed is 'square' symbol i.e. 'new line character' in Oracle. We are updating this to an ODS object. When looked at error log, observed that green light for the number of records transferred and updated, but finally when it load into ODS object and activates popping up the error message saying 'could not recognize special character'.
    Please help me getting the 2 issues resolved.
    Thanks in advance.
    Regards,
    Sudhakar.

    Hi Everyone,
    Thanks for inputs on Special characters issue...
    Finally resolved with below piece of code in the start routine:
    DATA: FLAG,
          OFF TYPE I,
          LEN TYPE I VALUE 1,
          ALLOWED_CHAR(95) VALUE
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ`~!@#$%^&*()-_=+ ' &
    'abcdefghijklmnopqrstuvwxyz:;<>,.?/|\{}[]"'''.
    CONSTANTS: C_CHAR VALUE '-'.
      LOOP AT DATA_PACKAGE WHERE NOT /BIC/ZI_DESC IS INITIAL .
        DO.
          IF DATA_PACKAGE-/BIC/ZI_DESC CN  ALLOWED_CHAR.
            REPLACE SECTION OFFSET SY-FDPOS LENGTH LEN OF
                    DATA_PACKAGE-/BIC/ZI_DESC WITH C_CHAR.
            FLAG = SPACE.
          ELSE.
            FLAG = 'X'.
          ENDIF.
          IF FLAG = 'X'.
            EXIT.
          ENDIF.
        ENDDO.
        MODIFY DATA_PACKAGE.
      ENDLOOP.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    I have seen the link sent by 'Eugene Khusainov' today. Thought putting my piece of code that may help others...
    Regards,
    Sudhakar.

  • Special characters in the combo box

    Hi OIM Gurus,
    I have populated some values with special characters in combo box,when i select the option it should show me the result set ,instead it shows"Illegal Characters Entered
    The data provided contains special characters that are not allowed. "
    is look-up a good option ? or any other fix for the combo box?
    Thanks in advance,
    Cats Paw

    I forget what I used (combo box, enum, etc) but I tried to put a + and - sign in and switch between the two. While the - sign showed up correctly, when the user went to select from the drop down, it was a separator! Not very intuitive! I thought a \ would escape it, but no luck.
    CLA, LabVIEW Versions 2010-2013

  • To Handle Special Characters(Guideu0099 ) in MATMAS IDOC fields

    Need to handle special characters like Guide™, as an attached  superscript in MATMAS02/05 IDOC field . The field name is TDLINE in E1MTXLM segment.
    As a trial run when these special characters are pasted in the TDLINE field, it throws an error that "the input field contains prohibited characters"
    Please let me know if there is any workaround for this.

    hi
    good
    go through these links, i hope these ll help you to solve your problem.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAGTFADMLO/CAGTFADMLO.pdf
    http://www.erphome.net/wdb/upload/forum14_f_2908.doc
    thanks
    mrutyun^

  • How to remove special characters while typing data in edit cell in datagrid in flex4

    Hi Friends,
    I am facing this problem "how to remove special characters while typing data in edit cell in datagrid in flex4".If know anyone please help in this
    Thanks,
    Anderson.

    Removes any characters from
    @myString that do not meet the
    provided criteria.
    CREATE FUNCTION dbo.GetCharacters(@myString varchar(500), @validChars varchar(100))
    RETURNS varchar(500) AS
    BEGIN
    While @myString like '%[^' + @validChars + ']%'
    Select @myString = replace(@myString,substring(@myString,patindex('%[^' + @validChars + ']%',@myString),1),'')
    Return @myString
    END
    Go
    Declare @testStr varchar(1000),
    @i int
    Set @i = 1
    while @i < 255
    Select
    @TestStr = isnull(@TestStr,'') + isnull(char(@i),''),
    @i = @i + 1
    Select @TestStr
    Select dbo.GetCharacters(@TestStr,'a-z')
    Select dbo.GetCharacters(@TestStr,'0-9')
    Select dbo.GetCharacters(@TestStr,'0-9a-z')
    Select dbo.GetCharacters(@TestStr,'02468bferlki')
    perfect soluction

  • How to handle special characters in Apex

    Hi ,
    In my application I have two regions - one is Report Region (Interactive Report) and other one is HTML region with two text items - Empno and name
    My Report has two columns Empno(varchar2) and Ename(varchar2).
    When I click the edit link in the report column, the empno should have a read only EMPNO value and ename is a text field with ENAME value.
    When I run my application I have encountered the following problems :
    1. if my empno has special characters like ' # ', the characters after that is not getting displayed
    2. if my empno has special characters like ',' - the characters after comma is treated as a next texitem value
    Here is my credential ,
    Workspace CTSAN_ORACLE_DB
    Username [email protected]
    Password lakshmi321
    URL : http://apex.oracle.com/pls/apex/f?p=9444:19:4292839314890159:::::
    Plz. suggest me how to rectify the above problems.
    Thanks,
    Anoo..
    Edited by: Anoo on Aug 13, 2010 3:05 AM

    Don't pass data values in URLs. Whilst it is possible to escape values to make them URL- and APEX parameter-safe, it is much better practice to avoid the problem altogether.
    Create a surrogate primary key on the table that is an immutable discrete numeric identifier and only use this as a URL parameter. In target pages/regions, use this PK value to retrieve the required data from the table.

  • Error during data load due to special characters in source data

    Hi Experts,
    We are trying to load Billing data into the BW using the billing item datasource. It seems that there are some special characters in the source data. When the record with these characters is encountered, the request turns red and the package is not loaded even into the PSA. The error we get in the monitor is something like
    'RECORD 5028: Contents from field ****  cannot be converted into type CURR',
    where the field **** is a key figure of type currency. We managed to identify the said record in RSA3 on the source system and found that one of the fields contains some invalid (special) characters that show up as squares in RSA3. The data in the rest of the fields, including the fields mentioned in the error  looks correct.
    Our source system is a non-unicode system wheras the BW system is unicode enabled. I figure that the data in the rest of the fields are getting misaligned due to the presence of the invalid characters in the above field. This was confirmed when we unassigned the field with the special characters from the transfer rules and removed the source field from the transfer structure. After doing this the data was loaded successfully and the request turned green.
    Can anyone suggest a way to either filter out such invalid characters from the source data or make some settings in the BW systems such that the special characters are no longer invalid in the BW system? We cannot write code in the transfer rules because the data package does not even come into the PSA. Is there any other method to solve this problem?
    Regards,
    Ted

    Hi Thad,
    I was wondering, if system is unicode or non unicode that should not matter the amount and currency field . As currencies are defined by SAP and it is in pure English at least a currency code part of 3 Chars. 
    Could this because of some incosistency of data ??
    I would like to know for Which currency  had some special characters it it in that particular record ??
    Hope that helps.
    Regards
    Mr Kapadia

  • Handling special characters in XML

    Hi,
    I am using Oracle 10g 'XMLType' datatype to store XML files. Before storing I parse the XML document using Java Xerces Parser. If it parses successfuly, then I perform some business rule execution based on XML file which was parsed. So till this stage there is no problems. But when XML file contains some special characters like copy-paste of some description from MS-Word document into XML tags, then Xerces parser will parse such characters with out any exceptions, but while inserting XML document, Oracle database just throws exception saying unable to handle special characters.. So how to avoid such exceptions or silent such exceptions with any specific settings respect to XMLType datatype in 10g DB.
    Please advice!
    Arvind Patil - IN

    Monica--
    In XI 2.0, we've noticed a number of issues processing special characters, primarily caused by the version of JCO that we're running.  It sounds like SAP has spent some time in the past few months focusing on these errors, so make sure you're on the most recent patchlevels of all your middleware components, including any of the middleware libraries that BC uses. In XI, we had to update the 3 files that make up the RFC library and JCO library.  SDM couldn't update the libraries for us -- we had to manually move the files to the right place.
    Escaped XML characters like "&amp;" "&#34;" "&quot;" were fixed as of JCO 2.0.10 (the current patchlevel on AIX/UNIX), the special character "&apos;" is fixed in the next release, JCO 2.0.11, due out in a few weeks (hotfixes are available).  I don't know the equivalent versions on other platforms.  By default, XI 2.0 appears to have shipped with JCO 2.0.5.  I would expect many XI 3.0 users to also be affected.
    This may or may not apply to BC, because I don't know what BC uses to talk to SAP under the covers.
    --Dan King
    Capgemini

  • JAVA Mapping: Handle Special characters like u00E4,u00FC an so on

    Hi everybody,
    we have a JAVA Mapping that gerenates text nodes with special characters.
    The generated XML is later used in an graphical message-mapping.
    During runtime we ge the trace/error:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error:
    com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 31(:main:, row:1, col:2498) at
    com.sap.aii.mappingtool.tf3.Transformer.checkParserException
    Does anybody know, how to modify the JAVA-mapping to have a workaound for this problem?
    Thanks
    Regards Mario
    Edited by: Mario Müller on Jul 22, 2008 4:33 AM

    Hi Mario,
    As java mapping does not validate the xml,the output gets created but if u have to use the xml structure,the u will have to include the following.
    Assume u r using a write method to write the output xml,then
    check for tspecial charactters like &,<,>.' etc and replce them as shown below
    private void write(String s)
         //Traverse through the string
    for (int i=0 ; i < string.length();i++)
         String s1 = data.substring(i, i + 1);
              if (s1.equals("&"))
                   write ("&amp;");
              else if (s1.equals("<"))
              write("&lt;");
              else if (s1.equals(">"))
              write("&gt;");
              else if (s1.equals("\""))
              write("&quot;");
              else if (s1.equals("'"))
              write("&apos;");
              else
              write(s1);
    Should help u out
    Edited by: Mohd Tauseef Ibrahim on Jul 22, 2008 11:08 AM
    Edited by: Mohd Tauseef Ibrahim on Jul 22, 2008 11:09 AM

  • Finding special characters in the column

    Hi,
    Need a help to find out the special characters in the column. since the data is loaded from external files like excel etc.., there
    are some special characters are got inserted in the column.
    how do i find out the rows in the column which has special characters, Please help ASAP...
    Thanks

    Hi,
    What do you mean by "special characters"?
    SQL> With T As(Select 'A?BC' txt from dual union all
      2            Select 'AB%C' txt from dual union all
      3            Select 'ACAA' txt from dual)
      4  Select txt from t where Regexp_Like(txt,'[[:punct:]]');
    TXT
    A?BC
    AB%C
    [:punct:]      Punctuation symbols
                    % . , " ' ? ! : # $ & ( ) * ;
                    + - / < > = @ [ ] \ ^ _ { } | ~
    {code}
    Regards,
    Christian Balz                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • I am with error of special characters in the hour to matter given in BI 7

    Good afternoon, I am with error of special characters in the hour to matter given in BI 7
    <a href="http://img234.imageshack.us/my.php?image=erroau3.jpg" target="_blank"><img src="http://img234.imageshack.us/img234/4083/erroau3.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a>

    OK....!!!!!
    just download the Excel file (*.xls) and try open with Word-MS. In the document search by the string that you have mentioned in the question. (Use Ctrl +F).
    If you see something like "ABC bla bla ba & instead of  &amp ,  then you have to pass the data through the code I've mentioned.
    You can get more details on encoding special characters UTF-8 in Google.com or Sun Websites etc.
    You can also encode the & in hexadecimal format to get the desired output.

  • Handle special characters in xml

    Hi,
      Our end users tend to copy the description text from Word documents to pdf form and submits it.
    If that text contains any special characters, its getting carried to the extracted xml. In the next step, when I try to assign a task to user with template and this xml, Managers cannot able to open the form and showing the error. When I assign the xml without special characters, its running fine.
    Please assist on how to handle this?
    My expectation is that user should be prompted in the form when he pastes any special characters or they should be auto-corrected to null values. if that is not possible, atleast we should able to filter the xml and eliminate special characters before the form go to next stage.
    Appreciate your help.
    Thanks,
    Krishna

    In first instance, I would have followed this way:
    http://www.dvteclipse.com/documentation/svlinter/How_to_use_special_characters_in_XML.3F.h tml
    so, I would have parsed the submitted text in a Validate event and changed any special chars to UTF-8 numeric reference.
    However, I found this:
    http://blog.mark-mclaren.info/2007/02/invalid-xml-characters-when-valid-utf8_5873.html
    which seems to state that not all UTF-8 characters are possible in XML.
    In fact, those allowed are listed here:
    http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char
    so, I would still use a Validate event script but based on the XML specs' Character Range. Exactly as Mark McLaren did in Java.
    This will permit to keep those special chars that are allowed. Your Managers will thank you.
    Hope it helps.

Maybe you are looking for