Storing a Non Printable -from keyboard- Character in Varchar2 Column

Hi,
I want to store a non-printable character in a varchar2 column. This character should be non-printable -from keyboard- for all character sets -or very difficult to print from keyboard-. It doesn't matter, whether it can be displayed on screen or not. It does matter INSTR function returns the character position of that character. It should be able to import export data without any problem for any NLS specific operating environment. For example, I plan to use chr(1) do you think it's appropriate? I appreciate your helps.
Best Regards,
Salim

What is the business requirement you're trying to satisfy?
If your database character set is based on ASCII, CHR(1) (the Start of Header) character is likely to be transferred between systems without character set conversion. Non-ASCII character sets (i.e. Big5 for Chinese data) don't necessarily share the same control characters, though, and generally won't have the same binary representation of an ASCII control character (so CHR(1) in a non-ASCII based database wouldn't necessarily return the same character that CHR(1) would in an ASCII based database).
Justin

Similar Messages

  • Non Printable Characters in varchar or varchar2 filed

    How can I know if a filed has non-printable characters.

    An example :
    TEST@db102 SQL> insert into test values('aaa'||chr(13)||'bbb'||chr(10)||'ccc');
    1 row created.
    TEST@db102 SQL> select * from test;
    A
    bbb
    ccc
    TEST@db102 SQL> select dump(a) from test;
    DUMP(A)
    Typ=1 Len=11: 97,97,97,13,98,98,98,10,99,99,99
    TEST@db102 SQL>                                                                      

  • Querying node value(s) from XML insde a varchar2 column

    CREATE TABLE "DEV1"."LOG" (
    "LOG_ID" NUMBER(10,0) NOT NULL,
    "LOG_DATA" VARCHAR2(1000 BYTE) NULL)
    SAMPLE LOG_DATA COLUMN DATA:
    <Log>
    <PartNumbers>13000,15000</PartNumbers>
    <OrderID>221</OrderID>
    <OrderDateTime>01/01/2013 22:32:43</OrderDateTime>
    <UserName>testUser</UserName>
    <ZipCode>12345</ZipCode>
    <TrackingID>333444555</TrackingID>
    </Log>     
    SELECT x.OrderID
    FROM DEV1.LOG
    ,xmltable('/Log'
    passing LOG.LOG_DATA
    columns OrderID char(100)     path './OrderID'
    ) x
    ERROR
    ORA-00932: inconsistent datatypes: expected - got CHAR
    No matter what datatype I put after "columns OrderID" I get this error. How can I get the data?

    instead of
    passing log.log_datatry
    passing XMLTYPE(log.log_data)

  • Spliting a string based on Non Printable character

    Hi,
    i have a requirement where i have to split a String based in non printable character " MYU(ascii: 230);
    es: ""This is to test æ raaaaaaaaaaaaaaaaa æ AAA010224544 æ 7118288888 æ
    æ is a not printable character and its ascci is 230..
    iam getting that string from form how to split it in Java..
    Any suggestions...?

    One of many ways
        String initString = "This is to test æ raaaaaaaaaaaaaaaaa æ AAA010224544 æ 7118288888 æ";
        String[] tokens = initString.split(String.valueOf((char)230));
        for (String string : tokens)
          System.out.println(string.trim());
        }

  • RTF non keyboard character missing

    When I export the RTF from the application file  non-keyboard character (symbol and mathematical pi fonts) converted in to square boxes.
    How to fix this issue.
    Please advice.

    becks wrote:
    URLencoder is java.Yeah I know.
    Just wondering how other people do it as well? I feel that should not let users copy paste those funny character into the system.Well it's not a very good system if it doesn't support Unicode. It's not that big an effort after all. Of course if you're not familiar with character encoding and unicode, I recommend you read this:
    http://www.joelonsoftware.com/articles/Unicode.html

  • 'Zero-width Non-Joiner' Unicode Control Character for Xperia International Keyboard in Persian

    I use Xperia International Keyboard in Persian (Farsi) on my Xperia Z3 Comapct. I really like its Gesture input for Persian. On the other hand I like Google Keyboard for Persian for its 'Zero-width Non-Joiner' Unicode Control Character key.This character is used in Persian as a non-breaking space or "نیم‌فاصله". But Google keyboard lacks gesture input for Persian. I would like it like very much If there is a ZWNJ (U+200C) key on next updates of Xperia International Keyboard for Persian. It would be perfect if it also have Arabic Decimal Separator (٫) (U+066B) and Arabic Thousand Separator (٬) (U+066C).

    This is a user led support forum however what I can do is message the team to take a look at your post and then they will be able to escalate this to the correct team - So if you don't receive a reply from a Sony staff member please be reassured that they will have read your post
    For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled.   Richard P. Feynman

  • IPod will not play any music. Seems like it is in "Pause" mode.  No sound from either the head phones or internal speaker.  I have 418 songs stored and none will play.

    iPod will not play any music. Seems like it is in “Pause” mode.  No sound from either the head phones or internal speaker.  I have 418 songs stored and none will play. I have tried resetting, turning on and off the iPod, etc. but to no avail.

    Try restoring from backup. Next would be a restore to factory defaults/new iPod.

  • Non Keyboard character.

    Hi all,
    I web host a folder of files in the apache. There a file name which contains non keyboard character. I use URLENCODER, it been encoded to %E2%80%98. Sorry that i cannot passte the character here, as is a offline system.
    Although is being encoded, is still returns a 404 when try to access the files. Anyone met this issue before?
    By the way, what is the culture? Should i really allow all these non-keyboard character?
    Regards,
    becks

    becks wrote:
    URLencoder is java.Yeah I know.
    Just wondering how other people do it as well? I feel that should not let users copy paste those funny character into the system.Well it's not a very good system if it doesn't support Unicode. It's not that big an effort after all. Of course if you're not familiar with character encoding and unicode, I recommend you read this:
    http://www.joelonsoftware.com/articles/Unicode.html

  • Removing non printable characters from an excel file using powershell

    Hello,
    anyone know how to remove non printable characters from an excel file using powershell?
    thanks,
    jose.

    To add - Excel is a binary file.  It cannot be managed via external methods easily.  You can write a macro that can do this.  Post in the Excel forum and explain what you are seeing and get the MVPs there to show you how to use the macro facility
    to edit cells.  Outside of cell text "unprintable" characters are a normal part of Excel.
    ¯\_(ツ)_/¯

  • I want to show pictures from my iphone 4 on my television.  I have the cables but it will only show a few pics stored online, none of those on the camera roll.  Would it make a difference if I upgraded the ios to ios 7?

    I want to show pictures from my iphone 4 on my television.  I have the cables but it will only show a few pics stored online, none of those on the camera roll.  Would it make a difference if I upgraded the ios to ios 7?

    1, iOS only works on iPhone, iPads or iPods. These drives were probably made with an operating system that preceeded OS X such as OS 7, OS 8 or OS9.
    2, No, the data on the Zip Drives is formatted for the Mac.
    3, If your reformat them then all of the data is wiped
    4, The problem would be that the PC can not read the files as formatted on the zip drive by the Mac
    5, There are services that might be able to migrate the data for you but I seriously doubt that Staples or Office Max can do it for you. The services that migrate data charge big bucks so be prepared to pay for it.
    Allan

  • Error converting data type varchar to numeric - maybe non printable character?

    Hello all. I'm having some trouble converting a column in my table from varchar(50) to decimal(20,4). I've also tried to convert it to int and had no luck. In trying to find the records with non numeric data, I ran this query...
    SELECT *
    FROM [table]
    WHERE [column] not like '%[^0-9]%'
    My result set was 32 rows where the field in question had zeros. This doesn't make sense to me. If it was a real zero, it would have been excluded from the query.
    So, I flipped it around and ran the following query, and got the same results.
    SELECT *
    FROM [table]
    WHERE [column] = '0'
    If it's really a string 0, what would keep it from converting to a numeric type? I'm wondering if there are non printable characters in there because this table was populated via SSIS package using a flat file.
    Thanks for any help you can provide!
    WeeLass

    I have discovered one of the values that will not convert. It is '-1.2317    ' and I tried RTRIM and those trailing spaces stay there.
    It has a length of 8, and ASCII value of 45, and converting to varbinary gives 0x2D312E3233313709.
    The 45 and 2D both point to a negative sign. This one does indeed have a negative sign, but it's in the front, not trailing. Also, another value that was failing was not negative, but did have the trailing spaces.
    Any ideas on how to figure out what those spaces actually are? Hopefully, if I know that, then I can know how to get rid of them.
    WeeLass
    It may be a hard space
    RTRIM trims only soft spaces
    try this and see if works
    REPLACE(ColumnName,CHAR(160),'')
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Select xmlelement of clob containing non-printable chars gives ORA-31011

    Using sqlplus against Ora9i database. We have some rows where the CLOB column contains non-printable chars because of a conversion from an old system.
    I'm trying to extract this data using xmlselect. Most of the time it works great, but for the above rows it dies with error:
    ORA-31011: XML parsing failed
    If I embed substr(columname,1,25) so that it doesn't get to the non-printable character (which is at about position 200), then the sql works great.
    Any ideas on how to massage this data, either on the fly, or I could do a one-time conversion. The problem is that darn CLOB. I can't even figure out how to find all the bad rows. Looking for sql to find the bad rows, or a function that I could put in a package, and then call from the select to convert it on the fly.
    thanks,
    Rick

    Thanks for your help. Anything I do (including your suggestion) to try and parse the xml bombs with an internal error. Without raising the exception.
    What I decided to do instead is do a search in the clob using instr(column, CHR(13)) but for also all CHR that are less than 32. I then replace it with a space. So I'm going to fix the data once rather than doing an on the fly fix.
    thanks again,
    Rick

  • Inserting strings of printable and non printable characters

    I would very much appreciate some help with the following
    To handle an interface with a legacy system I need to create strings containing both printable and non-printabel ascii characters. And with non printable characters I mean in particular those in the range of ASCII 128 to 159.
    It seems it is not possible to insert a string containting both printable and not printable characters from the afore mentioned range into a VARCHAR2 table column as the following demonstrates:
    insert into test values(chr(156)); -- this inserts the 'œ' symbol.
    SQL> select test, ascii(test), length(test), substr(test,1,1), ascii(substr(test,1,1))from test;
    TEST       ASCII(TEST) LENGTH(TEST) SUBSTR(TEST,1,1) ASCII(SUBSTR(TEST,1,1))
    ┐                  156            1That the the character mapped is shown as '┐' and not 'œ' is not really issue for my application, what is important is that the ASCII value is shown as 156, which is the ASCII code of the character I inserted.
    What is however strange (actually probably not strange but has to do with the lack of understanding of the issue at hand) is that substr returns an empty string...
    Now I try to insert a concatenated string, first the "non printable" character then a printable character
    insert into test values(chr(156)||chr(65));
    SQL> select test, ascii(test), length(test), substr(test,1,1), ascii(substr(test,1,1))from test;
    TEST       ASCII(TEST) LENGTH(TEST) SUBSTR(TEST,1,1) ASCII(SUBSTR(TEST,1,1))
    A                   65            1 A                                     65For some reason the not printable character (chr(156)) is now not inserted or at least does not appear when I selected the data from the table, this effect seems to apply to all characters in the range of ASCII 128 to 159 (tried some but not all) However for instance CHR(13) can be inserted as part of a string as shown above .
    For our application I really don't care much what character is shown or not show, what is important is that I can retrieve the ASCII value and that this value matches the one I inserted which for some reason does not seem to work.
    This seems to be, at least to some extent a character set issue. I have also tested this on a database with character sets set as follows
    NLS_CHARACTERSET
    WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET
    AL16UTF16
    With WE8MSWIN1252 the described issue does NOT occur, however unfortunately I must use NLS_CHARACTERSET AL32UTF8 which produces the results as described above!
    As said any insights would be much appreciated as I am slowly but surely starting to despair.
    For completions sake, character sets are set as follows (changing it is NOT an option):
    NLS_CHARACTERSET
    AL32UTF8
    NLS_NCHAR_CHARACTERSET
    AL16UTF16
    The test table is created as follows
    CREATE TABLE TEST
    TEST VARCHAR2(1000 BYTE)
    Database Version 11.2.0.3.0
    Edited by: helios.taraba on Dec 2, 2012 10:18 AM --Added database version
    Edited by: helios.taraba on Dec 2, 2012 10:24 AM Added description of test results using NLS_CHARACTERSET WE8MSWIN1252

    Hello Orafad,
    Thanks for your reply, at least I understand the effects I'm seeing i.e.
    +"For multibyte character sets, n must resolve to one entire code point. Invalid code points are not validated, and the result of specifying invalid code points is indeterminate."+
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions026.htm
    You are absolutely right I could use chr(50579) to get the ligature symbol. However as what we are trying to achieve is to implement a legacy interface to a 20+ years old subsystem we are actually not so much interested in the symbol itself but rather in the ascii value of that symbol (156 as you so rightly point out in the win-1252 characterset), this particular field represents the lenght of the message being sent to the subsystem and can vary from decimal 68 to 164 and is also considered in a checksum calculation which is part of the message.
    As changing the nls_characterset of the database is not an option I guess I only have one reasonable avenue to resolve this namely to push the functionality to added the "encoded" length of the message (and the calculation of the checksum) to the java driver which is responsible for sending the message (tcp/ip) to the subsystem. Here we should not have any issues adding a byte with the value 156 (or any other for that matter) to the datastream.
    Thankfully all other fields have characters with ascii values below 128 and above 31.
    I'm going to leave my question as un-answered for a bit longer in the hopes of someone coming up with a golden bullet, although not getting my hopes up.
    Thanks, Helios

  • Need help in removing non printable characters

    hi
    I am having an issue with non printable characters in webservice. This webservice dishes out xml in B2B communication to my clients programs. Due to data corruption in oracle (dont know who is creating bad data ) I am having non printable characters in the xml file which is generated from database. I am dishing out this to our customers. since the data in updated every day it is imposible to fix the data every time. I need to write a very very effficient method to strip non printable characters from strings from the xml. Can some one Please help on this one. I want to make sure this method is very efficient because this method could be potentially be called lots of times. I am using JDK 1.3.1 and oracle 8i
    Any help will be appreciated
    Thanks
    Ashok Pappu

    At some point you existing program is probably converting from String data to the XML bytes through a CharsetEncoder, probably inside a java.io.Writer.
    Perhaps your best approach might be to write your own java.nio.charset.CharsetEncoder which deals with the bad characters as you see fit.
    You can register a new java.nio.charset.CharSet as a private character set type. Because this should result in simply replacing a standard CharsetEncoder with a non-standard one hopefully the overheads would be low.

  • Remove non ASCII from a text loaded to a table

    I would like to use SQLLDR to load a text file to a table.
    But I would like to remove all non ASCII from the data either
    1. During SQL LOAD
    2. Or through a stored procedure.
    Could this be done in Oracle?

    I have done this on an insert trigger in the past, searching for ascii 0.
    In my case it went someting like this:
    FOR chr_indx  IN 1 .. length(:new.problem_string) loop
      IF ascii(substr(:new.problem_string,chr_indx,1)) = 0 then  --search here for what you consider is a problem character(s)
        --fix the problem
      end if;
    end loop;

Maybe you are looking for

  • Clearing recent history on Firefox freezes browser.

    This is actually a problem and what I did to fix it.... Firefox 25 and Mac OS 10.7 (Lion) Went to "Clear Recent History" and Firefox stopped responding. • I had to use COMMAND-OPTION-ESC to quit Firefox I then went to Firefox preferences-->Privacy-->

  • Is there a way to find version for customizing objects?

    hi Since we dont have version management for customizing objects like we have for programs or r/3 repository is there a way or some uitlity to find the version of customizing objects? ~Suresh

  • Having trouble with Kingston 4gb RAM. Please help!

    So I ordered Kingston 4GB PC2-5300 667/533 MHz Dual Kit for my Macbook and I'm having so much trouble installing it. I can't get BOTH 2GB sticks to work at the same time, it will ONLY let me use ONE 2GB stick at a time in either slot. It works when I

  • ORNEKLERLE ORACLE 11G R2 VE GENEL KAVRAMLAR

    HI Is this book available in AZERBAIJAN: Authors: Anar Godjaev  and Emrah Uysal (Turkey) This book was written in Turkish Thank  you

  • Bluetooth and wireless network not working

    About a week ago my iphone 4s stopped discovering my bluetooth devices. Today, it will not let me log onto my wireless network as well. I have reset both my phone and router, but nothing seems to be working. Any suggestions?