How to detect any special character ina string?

Hi!
I'm having a problem with a string. Basically the string is an output of some function and that may contains some special character which is not shown in the string - for example - chr(10)/chr(13) etc.
Is there any method or procedure that can detect all the special character inside that string and remove them all other than all the characters and digitis which is in form of character? I'm using oracle 9i.
Thanks in advance for your reply.
Regards.
Satyaki De.

I've tried your solution - but i don't think it is working --
satyaki>ed
Wrote file afiedt.buf
  1  create or replace function extract_printable(vc varchar2)
  2  return varchar2
  3  is
  4  c_non_printable varchar2(33)
  5    := chr(00)||chr(01)||chr(02)||chr(03)||chr(04)||chr(05)||chr(06)||chr(07)||chr(08)||chr(09)
  6    || chr(10)||chr(11)||chr(12)||chr(13)||chr(14)||chr(15)||chr(16)||chr(17)||chr(18)||chr(19)
  7    || chr(20)||chr(21)||chr(22)||chr(23)||chr(24)||chr(25)||chr(26)||chr(27)||chr(28)||chr(29)
  8    || chr(30)||chr(31)||chr(127);
  9  begin
10    return(translate(vc,'a'||c_non_printable,'a'));
11* end;
satyaki>/
Function created.
satyaki>
satyaki>select length(extract_printable('this is        ')) src
  2  from dual;
       SRC
        15
satyaki>But, thanks for your reply.
Regards.
Satyaki De.

Similar Messages

  • How to escape the special character ' (ascii 39) in a select query?

    Hi,
    does anybody know how to escape the special character ' (ascii 39) in a select query?
    I've tried a lot of ways but nothing seems to work, for example I try to get all
    names in table foo where coloumn name contains a '-sign (ascii 39)
    select name from foo where name like '%\'%';
    select name from foo where name like '%{'}%';
    select name from atg_horse where name like '%chr(39)%'
    ... but neither works, I end up with a ORA-01756: quoted string not properly terminated
    I would apriciate any help
    /Carl-Michael

    friends
    thanks for ur time and effort that u gave to reply to my problem.
    But my main problem is that when my application (VC++ 7) fires the following query in the oracle database , it does not return any rows.
    SELECT count(*) FROM ORGANISATION WHERE UPPER(ORGANISATION.ORGANISATIONNAME)
    LIKE N'β%' ORDER BY ORGANISATION.ORGANISATIONNAME
    the above question in the previous thread was just to check on sql plus as it's editor does not support unicode characters.

  • How to escape the special character ' (ascii 39) in a query

    Hi,
    does anybody know how to escape the special character ' (ascii 39) in a select query?
    I've tried a lot of ways but nothing seems to work, for example I try to get all
    names in table foo where coloumn name contains a '-sign (ascii 39)
    select name from foo where name like '%\'%';
    select name from foo where name like '%{'}%';
    select name from atg_horse where name like '%chr(39)%'
    ... but neither works, I end up with a ORA-01756: quoted string not properly terminated
    I would apriciate any help
    /Carl-Michael

    Use two single quotes inside your literals to represent one single quote.
    For example, this would find my name:
    SELECT *
      FROM emp
    WHERE name = 'Michael O''Neill';
    Michael O'Neill
    (acutely aware of the apostrophe issues in the world)

  • How to add A Special Character '&' in CGNode.addData()

    Hi,
    I'm using XML class Generator to create a XML file. When I used CGNode.addData and the data contains "&" character, I got the following error:
    oracle.xml.classgen.InvalidContentException: illegal character '&' in CharData
    at oracle.xml.classgen.CGNode.addData(CGNode.java, Compiled code)
    Does anybody know how to insert this special character in XML Class Generator?
    Thank you in advance!
    weiwei

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by weiwei:
    Hi,
    I'm using XML class Generator to create a XML file. When I used CGNode.addData and the data contains "&" character, I got the following error:
    oracle.xml.classgen.InvalidContentException: illegal character '&' in CharData
    at oracle.xml.classgen.CGNode.addData(CGNode.java, Compiled code)
    Does anybody know how to insert this special character in XML Class Generator?
    Thank you in advance!
    weiwei<HR></BLOCKQUOTE>
    I had the same problem here and the only solution I found, was to turn of the validation using the setValidationMode member function of ClassGenerator.
    Regards,
    Reinhard Schuerer

  • How to use the special character pallet in Maverics with Illustrator

    How to use the special character pallet in Mavericks with Illustrator - I follow the help instructions, but the pasted in object looks like a rectangle with an X, I have done this before, in earlier versions of AI, but cannot make it work in CS6.
    In fact, I can open an old AI file (CS4), copy the character (a graphic symbol, also taken from the special character set), paste it in, and it works, but can't do this with a new one, from the drop down, Show Character Viewer, in the Mavericks menu bar.

    The box with an X indicates the font you are using does not have the glyph you are trying to paste. Try a different font.

  • How can i display special character?

    how can i display special character that come from DB.
    for example i have in field in Table that has this value <Id, r>.
    i want to print this value to the html. and replace the <,> to special character.

    "<" is "<"
    ">" is ">"

  • How to find and remove any special character in filename?

    I have a files in various Windows Servers 2003 with a special character at his names, who are causing problem with backup software, i don´t know what character is because in explorer they are not shown and in command line they are shown only as interrogation
    mark and for this, i don´t know how i will find and remove then.
    Thanks.

    Hi,
    I agree with Dave. We can try using
    chkdsk utility to check the file system and file system metadata of a volume for logical and physical errors.
    Regarding
    chkdsk, the following article can be referred to for more information.
    Chkdsk
    http://technet.microsoft.com/en-us/library/cc730714.aspx
    Best regards,
    Frank Shen

  • How to know the Special character?

    I am using Release 10.2.0.1.0 version of oracle. I am getting a special character, but i suspect it as any other language caharacter.
    Its appearing in my 'TOAD editor/Sql prompt editor' as 'A?'. but when i am selecting it from the table using below query, its giving 'No rows Returned'.
    select id from tab1 where id like 'A%';
    Please let me know, how can i be able to see the exact character or which editor will enable me to see the character?
    I think sql developer GUI might be able to show the same but i dont have sql developer with me.

    930254 wrote:
    I am using Release 10.2.0.1.0 version of oracle. I am getting a special character, but i suspect it as any other language caharacter.
    Its appearing in my 'TOAD editor/Sql prompt editor' as 'A?'. but when i am selecting it from the table using below query, its giving 'No rows Returned'.
    select id from tab1 where id like 'A%';
    Please let me know, how can i be able to see the exact character or which editor will enable me to see the character?
    I think sql developer GUI might be able to show the same but i dont have sql developer with me.select ASCIISTR(id) from tab1 where id like 'A%';

  • How do I get Special character Euro symbol € to display ?

    Hi,
    How do I get the euro symbol € to display in Flash from
    PHP file created in DW ?. It does not display it properly. I have
    simplified the PHP code I have is:
    <?php
    $msgtoflash = "This is the Euro Symbol &#8364";
    print ("&Databaseinfo=$msgtoflash");
    ?>
    The &#8364 is a special character code for HTML.
    If I use the $ or £ symbols it works perfectly but not
    € ?
    Thanks,
    Paul

    maith wrote:
    > Im using Actionscript2. I had placed a query in Flash in
    "General
    > Discussions", before I came on the Dreamweaver Forum,
    but got no reply.
    The way to get the euro symbol to display in Flash is to use
    XML. I have
    tested this, and it works:
    euro.php
    <?php
    header('Content-type: text/xml');
    echo '<root>
    <elem>This is the euro symbol:
    &#8364;</elem>
    </root>';
    ?>
    ActionScript 2.0 to display the value of <elem> in a
    dynamic text field
    called myText:
    var myXML:XML = new XML();
    myXML.ignoreWhite = true;
    myXML.onLoad = handleLoad;
    myXML.load('
    http://localhost/test/euro.php');
    function handleLoad(success) {
    if (success) {
    var theRoot:XMLNode = this.firstChild;
    myText.text = theRoot.firstChild.firstChild.nodeValue;
    } else {
    myText.text = 'Not working :(';
    Handling XML in ActionScript 2.0 is like poking needles in
    your eyes,
    but it's the only way I have been able to get the euro symbol
    from an
    external source into a Flash movie.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to allow the special character in folder or filename

    when i add the special character "&" in folder or file name it gives following error
    "The file or folder name "P&A" contains invalid characters. Please use a different name. Invalid characters include the following: ~ " # % & * : < > ? / \ { | }. The name cannot begin or end with dot and cannot contains consecutive dots."
    how can i allow these character in folder or file name.
    waiting

    Hello to everybody
    It's ok for the ~ " # % & * : < > ? / \ { | } characters, they cannot be allowed,
    but in a lot of languages there are letters like  è é à ù ò that are accepted for path and/or filename;
    how to allow these characters? Moss indexes them but when doing some searches and clicking on these files, in the new internet explorer windows the file cannot be opened abd examining the url the è é à ù ò are replaced with other character.
    Thanks in advance to everybody
    Regards to all
    Roberto GerlandoGerly

  • How to deal with special character in source file

    Hi experts,
                      i am doing a file to file scenario in which my source file contains many special characters when i am puting this file into moni its going with the special character .My source file is a fixed length file so in content conversion i have specified the file length but due to these special charcters these field lenght is also varing.So please guide me how to deal with these special characters in sender adapter
    regards,
    Saurabh

    you could try using a Java Mapping to change the encoding manually. For that, set the encoding of the OutputFormat of the XML you'll serialize. Try the following code piece for the mapping (inside a try/catch declaration):
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder documentBuilder = factory.newDocumentBuilder();
    Document input = documentBuilder.parse(in);
    OutputFormat format = new OutputFormat(XML, "ISO-8859-1", false);
    XMLSerializer serializer = new XMLSerializer(out, format);
    For more details check this guide:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42

  • How to discard the special character from field-Table.

    Hi
    In my data i am having a lot of SPECIAL CHARACTER also involved, I want to display only the consumer name (PURELY), is there any method/function module to discard the special character and display only the A-Z character as stored in DB.
    Gaurav

    if itab-field CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    or
    if itab-field CP 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
    then do ur else calculation.
    else.
    delete itab.
    Edited by: tahir naqqash on Feb 17, 2009 4:27 PM
    Edited by: tahir naqqash on Feb 17, 2009 5:21 PM

  • How to detect any key pressed for program running in the background?

    Hi All,
    is it possible to detect when any key is pressed if a java program is not in the focus? For example, when I have a console based program I can write something like:
    System.in.read();
    and wait until any key is pressed. However, if I move the mouse away from the console and make any other window active, the console program "doesn't hear" anything. Ok, it's clear, of course, but how is it possible to make the program detect any keys pressed even if it's running in the background?
    Thanks a lot for any hints!

    qnx wrote:
    1) Stop trying to make spyware. -> I don't do anything like this!
    2) Stop re-posting the same questions. -> didn't know they are the same, sorry.
    3) Stop taking us for fools. -> what? Honestly, I don't think that I realy deserved this :)With a limited posting history and the type of questions you are asking they are unusual.
    There are very few legitimate problem domains that would require what you are asking about. There are illegitimate ones though. And the legitimate ones would generally require someone with quite a bit of programming experience and would also be required (the fact that java can't do it would not get rid of the requirement.)
    Thus one might make assumptions about your intentions.

  • How to find the special character in a give string/sentance

    Hi All,
    I have one task to complete with in the give time. Since i am not very good in PL/SQL i need your your help.
    Requirement is :
    I have to come up with the SQL or PL/SQL code which should return and find the special or hidden character in the datafiles name in a database. There are nearly 400+ database are present in almost all the flavor of UNIX and i have to check the each and every database.
    As you know , Name of the data file will be like this :
    /u02/instance_name\oradata\datafile_01.dbf So it should avoid these things and find out only the special characters in the datafile name.
    a-z , A-Z , 0-9 and \ Please keep in mind that ...... I will be firing the Oracle script from Oracle 9i client which will access all the database from Oracle 9i to 11g in one short and give me the result.
    Please help me to resolve this issue and let me know if you need more information.

    Hi,
    Mukesh wrote:
    Hi Frank,
    This is excellent function. Thanks for you responce.
    I want to modify this query in such a way that .... i should get only those datafiles name which are holding special characters. I don't know how to put this in where condition. :( Here's one way:
    SELECT  file_name
    ,       ...     -- other expressions, if you want any
    FROM    dba_data_files
    WHERE   TRANSLATE ( file_name
                      , '?0123456789.ABCDEFGHIJKLMNOPQRSTUVWXYZ\_/abcdefghijklmnopqrstuvwxyz'
                      ) IS NOT NULL Among the other expressions you can put into the SELECT clause (if you want to) is a copy of the TRANSLATE function, as you had in your message. That would highlight exactly which character(s) made the file_name invalid.

  • How does Detect() impact remaining character balance?

    I have read a number of discussions here where Microsoft Translator declares that Detect() does not subtract from your account balance.
    However, I'm seeing 1-2 characters substracted for each call we are making to Detect().
    Can we please see some official character cost per call or can you explain why a couple characters are subtracted from our remaining balance with each Detect() call? Is it counting the characters *returned* by the API? Getting charged for a return value
    of "fr" or "en" would explain what we're seeing...

    For reference, here are some previous responses with conflicting info:
    Yes, it does: https://social.msdn.microsoft.com/Forums/en-US/5beb2cb9-17c2-46e0-a708-e836eb67853c/what-is-a-transaction-do-you-charge-on-detect-language?forum=microsofttranslator
    No, it does not: https://social.msdn.microsoft.com/Forums/en-US/f931a73a-f6ba-4720-807f-4c67b6623fb8/pricing-for-language-detection?forum=microsofttranslator
    No, it does not, but also seeing characters deducted: https://social.msdn.microsoft.com/Forums/en-US/e0dbdb47-ca72-416a-9644-7b240823348c/how-many-characters-are-deducted-when-calling-detect-language-api?forum=translator

Maybe you are looking for

  • 10G RAC: CRS 설치 실패 후 정리 방법

    제품 : ORACLE SERVER 작성날짜 : 2004-11-30 10G RAC: CRS 설치 실패 후 정리 방법 ===================================== PURPOSE 이 문서는, DBA와 기술 지원 엔지니어가 10g RAC의 CRS (Cluster Ready Services) 실패시, 일부 설치된 CRS를 제거하는데 필요한 정보를 제공하는 것을 목적으로 한다. Explanation 설치에 실패한 CRS는 노드 리부

  • I lose my wifi and phone frequently, the internet company says it's my time capsule. What's going on?

    I've only had the Time Capsule since the end of Dec. I frequently lose my wifi and phone, I've called My service provider and they always say everything on their end is working and that it may be my wireless router. I don't know how to fix this. I ha

  • Television and Windows

    I have had good success hooking up my MacBook to the television with the adapter and S-Video. Now I would like it to appear using Windows XP. I have gone to the Intel Graphics panel and played with the settings, but cannot get it to show on the TV. I

  • CiscoWorks - Job Browser very slow

    Hello, We are running LMS 3.2 and I am trying to access Common Services -> Server -> Admin -> Job Browser but it is extremely slow. Waited for half hour yet it is processing the response page. Please assist. Thanks.

  • My Sigma 17-70 f2.8-4DC is on the supported lens list but not in the Profile Downloader.

    My Sigma 17-70 f2.8-4DC is on the supported lens list but not in the Profile Downloader. How can I download the profile? Thanks very much.