Replacing special characters with its actual value

Hi all

Anyone have an idea how to replace an extended character (ASCII ranging from 128 to 255 value) for its actual character set in SQL/PLSQL?

For example: '½' should be replaced on a "1/2".
'¼' should be replaced with "1/4"

Ultimately if the value is "California 71 ½" then the result should be "California 71 1/2". "."

Thanks for your time!

Kind regards

REPLACE the function?

SQL> select replace('California 71 ½', '½', '1/2') from dual;

REPLACE('CALIFORNIA71½','½','1
------------------------------
California 71 1/2
 

Tags: Database

Similar Questions

  • Replace special characters in the FDF

    Hello

    I've looked everywhere and can't find the answer to this simple problem.  I can handle javascript in an HTML environment using free scripts, but it is not so easy in a PDF form.  I use Adobe Acrobat 9 Pro and I have a form that once completed and submitted, generates and sends a FDF file.  I use a script on the server side, called FormGenie do this and the script hate parentheses and some other characters, they break the FDF file.  Everything I want to do is set up a document level Javascript that find and replace all instances of these special characters with something license as a hyphen - or just a space.

    I tried:

    function clearText() {}
    document. FormName.FieldName.Value = filterNum (document. FormName.FieldName.value)

    function filterNum (str) {}
    re = /\$|#|~|\%|\*|\^|\(|\)|\+|\=|\[|\]|\[|\}|\{|\;|\"|\<|\>|\?| \|| \\|\!| \$/g;
    remove special characters as ' $' and ',' etc...
    return str.replace (re, "-");
    }
    }

    and

    function clearText2 (str) {}

    stringName = stringName.replace (/------$| #| ~ |------% |------* |------^ | \(|\) |--------+ |------= |------[|------] |------[{|------} |------{|------; |------"|"}]) ------< | ------> | \ ? | \|| \\|\!| \$ /g,'-');
    }

    I know that these are not good, but I have to be at least barking to the top of the tree on the right.

    Can anyone help?

    Thank you

    You create the form in Acrobat or LiveCycle Designer?

    In general, you can place a script typo in the script of the text of each filter field field hit, in the case where something replacing the user typed with something else would not cause the concern of the user. An alternative would be to be implemented a script that parses the fields just before the submission form action takes place and not to replace them.

    For example, you can use the following JavaScript typo customized for text fields created in Acrobat:

    If (! event.willCommit) {}

    Event.change = event.change.replace (/ [------$# ~ %------*------*------^ \ (\)------+=------[\]------{\};------"\<\>\?]) \ | \\\ !] /g, "-");

    }

    and it will replace these characters when the user types the data into a text field. May not include all the character you want replaced, but you should get the idea.

  • Replace special characters

    Hello

    I need SQL or PL/SQL code to replace special characters such as!, @, #, $, %, ^ of the given string.

    For example, if the given string is

    "it is - test * strin #g to @ spe % ial charact!" ERS"he should replace all special characters and provide the output voltage

    It's test string with special characters

    Please enter the code

    Thank you

    You have commas in the character set block and the [[: alnum:]] is equivalent to [a-zA-Z0-9], you may want to include a space in this updated chacter block.

    Select REGEXP_REPLACE ("This is test * strin #g to @ spe % ial charact!") ERS ',' [^ [: alnum:]] *', ")

    of the double

    Output

    It's test string with blue characters

    EDIT: I do not know what will want the characters allow the OP. For example, a comma, question mark, comma, colon, apostrophe, full stop etc. are all valid in a sentence.

  • Dell XPS 13 type special characters with keyboard

    I'm unable to type special characters with my Dell XPS 13 with Windows 8 pre-loaded. For example when you type ' ^ ' followed by 'e', you should get 'e '.

    My previous 13 XPS with Windows 7 preinstalled worked well. I loaded all the latest drivers, but the functionality is still missing. Is there a setting that needs to be turned on? Or are still missing drivers for Windows 8?

    Help will be appreciated

    SHE FOUND! Press "Fn + Ctrl + LShift" simultaneously to activate and deactivate the entry of special characters

  • replace the characters with accent with their basic letter

    Hello

    I need to replace the characters with an accent with their basic letter

    a = > has
    n = > n

    I use classes of equivalence as [[= n =]] in regexp_replace, but then I need to call it for each letter. Is there a simpler way?

    Concerning
    Marcus

    Given that I only have the names to convert INITCAP

    It seems that you can use the binary case-insensitive or accent sorting to get the results you want so:

    SQL> with t as (
     select 'ñÉäßÑéàâ' str from dual
    )
    --
    --
    select str, utl_raw.cast_to_varchar2((nlssort(str, 'nls_sort=binary_ai'))) str2 from t
    /
    STR      STR2
    -------- ---------------
    ñÉäßÑéàâ neassneaa
    1 row selected.
    
  • SQL query: How to match multiple names strictly with its appropriate values

    Hi all

    Assume there is a table of CODES (with 3 columns) as follows:...
    ------------------------------------------------
    Name ID value
    ------------------------------------------------
    SFO 100 080
    200 NY 044
    300. THE 040
    ------------------------------------------------

    I would need to write a SQL to retrieve the rows that match few of names and values. For example: (1) name = "NY" and value = '044' and (2) name = "LA" and value = "040".

    I wrote this sql...
    SELECT id, name, value of CODES whose name IN ('NY', THE ') and the value IN ('044 ', ' 040')
    This returns 2 rows as expected.

    At the same time, even for the following query, the same 2 rows are returned (which is false)
    SELECT id, name, value of CODES whose name in ('NY', THE ') and value in ('044 ', ' 444')
    -See the code std 444.

    My requirement is that the above query should return to the line for NY.

    My question is: how to match multiple names strictly with its appropriate values... ? That is to say, unless '040' is specified in the part 'value', the corresponding line in 'LA' should not be returned...

    I feel, nor the case AND neither the case of GOLD can be used in Where clause to check these 4 values.

    Any ideas... ? Can you please let me know... ?

    Thank you
    REDA

    as:

    select id, name, value from CODES where (name, value) in (('NY', '044'), ('LA', '040'))
    

    Published by: Lacotte Renaud on February 16, 2010 10:35

  • Problems with special characters with Apex5

    Hello together,

    I hope, I'm right on this forum with this problem, I have found no other best match.

    I have a single database called apex12D on 12.1.0.2 it's my database of the 5 Apex develompent. Apex 5.0.2 is installed, also the German language of Apex. The OS is Oracle Linux 6.

    On a second machine that I have configured the Oracle Data Service remains with tomcat (installed from the repositories) and apache (also installed deposits), running on the Oracle Linux 7 operating system. This machine is my "http server" to connect to my Apex environment. Everything is very well workung, but when I go on my Apex Admin Backend all special characters in German (A, U, O,...) are displayed incorrectly. Which looks very good.

    What makes that I made:

    To the database (apex12D), I put all the nls paramereters the installation of the database of German letters:

    SYS@apex12D> select * from nls_database_parameters;
    
    
    PARAMETER VALUE
    ---------------------------------------------------------
    NLS_RDBMS_VERSION 12.1.0.2.0
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_LENGTH_SEMANTICS BYTE
    NLS_COMP BINARY
    NLS_DUAL_CURRENCY ?
    NLS_TIMESTAMP_TZ_FORMAT DD.MM.RR HH24:MI:SSXFF TZR
    NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
    NLS_TIMESTAMP_FORMAT DD.MM.RR HH24:MI:SSXFF
    NLS_TIME_FORMAT HH24:MI:SSXFF
    NLS_SORT GERMAN
    NLS_DATE_LANGUAGE GERMAN
    NLS_DATE_FORMAT DD.MM.RR
    NLS_CALENDAR GREGORIAN
    NLS_NUMERIC_CHARACTERS ,.
    NLS_NCHAR_CHARACTERSET UTF8
    NLS_CHARACTERSET AL32UTF8
    NLS_ISO_CURRENCY GERMANY
    NLS_CURRENCY ?
    NLS_TERRITORY GERMANY
    NLS_LANGUAGE GERMAN
    
    
    20 rows selected.
    

    SPFILE parameters tells a different story, I tried to put them with "change the database < parameter > = < value > scope = spfile" and if a database has restarted, nothing changes.

    SYS@apex12D> show parameter nls
    
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    nls_calendar                         string      GREGORIAN
    nls_comp                             string      BINARY
    nls_currency                         string      $
    nls_date_format                      string      DD-MON-RR
    nls_date_language                    string      AMERICAN
    nls_dual_currency                    string      $
    nls_iso_currency                     string      AMERICA
    nls_language                         string      AMERICAN
    nls_length_semantics                 string      BYTE
    nls_nchar_conv_excp                  string      FALSE
    nls_numeric_characters               string      .,
    nls_sort                             string      BINARY
    nls_territory                        string      AMERICA
    nls_time_format                      string      HH.MI.SSXFF AM
    nls_time_tz_format                   string      HH.MI.SSXFF AM TZR
    nls_timestamp_format                 string      DD-MON-RR HH.MI.SSXFF AM
    nls_timestamp_tz_format              string      DD-MON-RR HH.MI.SSXFF AM TZR
    SYS@apex12D>
    

    Interestingly, it is that when I write a pfile to the bottom of my spfile and open it with vi, everything looks great. But OK.

    apex12D.__data_transfer_cache_size=0
    apex12D.__db_cache_size=2030043136
    apex12D.__java_pool_size=50331648
    apex12D.__large_pool_size=385875968
    apex12D.__oracle_base='/usr/local/oracle'#ORACLE_BASE set from environment
    apex12D.__pga_aggregate_target=536870912
    apex12D.__sga_target=3221225472
    apex12D.__shared_io_pool_size=150994944
    apex12D.__shared_pool_size=570425344
    apex12D.__streams_pool_size=16777216
    *.audit_file_dest='/usr/local/oracle/admin/apex12D/adump'
    *.audit_trail='db'
    *.compatible='12.1.0.2.0'
    *.control_files='+DATA_QUM169/APEX12D/CONTROLFILE/current.505.898513523','+FRA_QUM169/APEX12D/CONTROLFILE/current.2094.898513525'
    *.db_block_size=8192
    *.db_create_file_dest='+DATA_QUM169'
    *.db_create_online_log_dest_1='+DATA_QUM169'
    *.db_create_online_log_dest_2='+FRA_QUM169'
    *.db_domain=''
    *.db_name='apex12D'
    *.db_recovery_file_dest='+FRA_QUM169'
    *.db_recovery_file_dest_size=10240m
    *.diagnostic_dest='/usr/local/oracle'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=apex12DXDB)'
    *.local_listener='LISTENER_APEX12D'
    *.log_archive_dest_1='LOCATION=+FRA_QUM169'
    *.log_archive_dest_2='LOCATION=+DATA_QUM169'
    *.log_archive_format='%t_%s_%r.dbf'
    *.nls_currency='$'
    *.nls_date_language='GERMAN'
    *.nls_dual_currency='$'
    *.nls_iso_currency='GERMANY'
    *.nls_language='GERMAN'
    *.nls_territory='GERMANY'
    *.open_cursors=300
    *.pga_aggregate_target=512m
    *.processes=600
    *.recyclebin='OFF'
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_target=3072m
    *.undo_tablespace='UNDOTBS1'
    

    The server' http' ADR is configured under the orards user, so I've put this in the .bash_profile:

    NLS_LANG=GERMAN_GERMANY.AL32UTF8
    
    
    export NLS_LANG
    

    The same I did for the root, just for test user, because only root can start tomcat and apache systemctl. Apache and tomcat user/bin/nologin as Bash, so I think that their bash_profile will not if I create a.

    But nothing really worked. Can anyone help please?

    Thank you and best regards,
    David

    Hello

    good German special characters are agree on the first server in ther, but not the second? I have this behavior when I set NLS_LANG = GERMAN_GERMANY. AL32UTF8 when I install the extension of the German language.

    Best regards

    Thomas

    (Grussle aus Böblingen)

  • Replacing special characters

    I have a page with a javascript tip which is fed with elements of a database query. Some of the results have special characters that my with the javascript syntax, in fact only 3 of them.

    Single quote, double quote and------.

    If I set & #34; in the database, it displays as a double in the ToolTip without problem, so what I want to do is to replace all occurrences of "with & #34;" and even with the others. The------should be replaced by------to view. I find it hard to do... any suggestions would be helpful... Here's my current attempt...

    < cfset temp = Replace (tester.loc_notes, ' "',' & #34;', 'ALL'") >

    Thank you

    If these quotes are displayed to the user, use " ", " or HTMLEditFormat().

    It is difficult to be more precise, unless you attach the code in question.

  • replace special characters in sql select

    Hello

    I have a little problem with one colunm blob in a db.

    A blob contains a text with decimal characters (an application writes this colunm in HTML), for example:

    Kedves Koll & #233 g & #225; k!

    & #193; He's & #225; sfoglal & #225; sotokat k & #233; RJ & #252; k a csatolt panasz & #252; gyben (PI-1167/2014.).

    & #220; gyf & #233; ladatok

    n & #233; v: lives & #225; RIS Anetta

    How could I replace the decimal characters with ascii characters?

    Thans a lot

    set define off

    SELECT UTL_I18N. UNESCAPE_REFERENCE ('Kedves Kollegak!)

    Allasfoglalasotokat Kerjuk a. csatolt panaszugyben (PI-1167/2014.)

    Ugyfeladatok

    Nev: Anetta Vitaris') FROM dual

    UTL_I18N. UNESCAPE_REFERENCE('KEDVESKOLLéGáK!) Allasfoglal & #225

    --------------------------------------------------------------------------------

    Kedves Kollegak!

    Allasfoglalasotokat Kerjuk a. csatolt panaszugyben (PI-1167/2014.)

    Ugyfeladatok

    Nev: Vitaris Anetta

    1 selected line.

  • How to enter special characters with the Run statement (@).

    Hello

    Oracle10g (R1)

    NLS_CHARACTERSET = "AL32UTF8.

    When I insert record with special characters like "hastened" with the customer tool insert it works fine, but I run the same INSERT statement execution i.e. statement "SQL > @/ path/Script_File_Name.sql ' special characters has not inserted correctly and it become something like 'h¿ta'.»»

    How to enter special characters correctly race (@) statement?

    Thank you

    If you create a file in Notepad, select the ANSI or the encoding UTF-8 in the dialog box save as.  Copy the Linux file in binary mode. Set the variable NLS_LANG ".» WE8MSWIN1252 ", if the file was saved with the ANSI coding or to. AL32UTF8", if the file was saved with UTF-8 encoding. Be sure to export the variable.  Then, start SQL * more and run the script.  I guess that you are on a U.S. or Western Europe of Windows version.

    Thank you

    Sergiusz

  • What happened to search for and replace special characters

    I'm a recent update of FrameMaker 9 FrameMaker 11. I use several notations with nonbreaking hyphens and nonbreaking spaces. In version 9, I was able to use the hexadecimal codes in the Find/Replace dialog box and search and replace these ratings. Now in version 11, it does not find these characters. I end up getting more I want.

    For example: I want to find

    (E Vote, September 12, 2008)

    This text has a non-breaking hyphen and showing spaces are nonbreaking. When I entered the document these characters, I used the combination of keys "Esc hyphen:" for the hyphen and "Ctrl + space" for spaces.

    When I enter "(E\x15Vote\x10Sept.\x1012,\x102008)" and press the button Search, FrameMaker converts the text to "(E\+Vote\s#Sept.\s#12,\s#2008)" and refers to a "Not Found" statement. I get the error even if I copy the text and paste it into the Find/Replace dialog box. I tried with "Deal", "use wildcards" and whole-word checks both market. I can't find it.

    Honestly, I never noticed if verstion 9A made the conversion of \x15 to------+ and dialog of \x10 to \s#, in the search/replace because he always found what I was looking for.

    I hope someone can tell me how to solve this problem, because it is a feature I use all the time in FrameMaker. I use hyphens and nonbreaking spaces everywhere in my documents.

    I also reported this as a bug because that's what happens if feels like to me. I went out and updated my installation of FrameMaker, thinking that this may have been reported and already corrected.

    A sad FrameMaker user

    Chris

    I'm not sure that's what you're looking for, but you might.

    Copy your text ' E-voting, September 12, 2008'.

    Go to Find/replace

    Select text and character Formats Clipboard from the drop-down

    Click on Search.

  • Bind variables (how replace the placeholders with the same value?)

    Hello, I have a code like this:
      procedure getAllTasks(o_cursor                      in out PKG_APPLICATION.rc,
                            in_filter_project_id          in T_FCT_TASK.project_id%type default -1,
                            in_filter_scope_id            in T_FCT_TASK.scope_id%type default -1,
                            in_filter_user_creator_id     in T_FCT_TASK.user_creator_id%type default -1,
                            in_filter_priority_id         in T_HST_TASK.priority_id%type default -1,
                            in_filter_status_id           in T_HST_TASK.status_id%type default -1,
                            in_filter_user_responsible_id in T_HST_TASK.user_responsible_id%type default -1,
                            in_pagination_first           in integer,
                            in_pagination_last            in integer) is
        v_query varchar2(4000) := v_query_allTasks || v_query_whereFilter;
      begin
        PKG_APPLICATION.setPagination(v_query);
      
        PKG_LOG.debug('query: ' || v_query, PCK);
      
        open o_cursor for v_query
          using in_filter_project_id, in_filter_scope_id, in_filter_user_creator_id, in_filter_priority_id, in_filter_status_id, in_filter_user_responsible_id, in_pagination_last, in_pagination_first;
      end;
    The variable v_query contains:
    SELECT * FROM (SELECT A.*, ROWNUM AS RNUM
                      FROM (
        SELECT task_id, project_id, project_name, scope_id, scope_name, user_creator_id, user_creator_login, title, description,
               priority_id, priority_name, status_id, status_name, user_responsible_id, user_responsible_login, due_date,
               last_modified_by_id, last_modified_by_login, last_modified
          FROM V_FCT_TASK
        WHERE project_id          = decode(:1, -1, project_id, :1)
          and scope_id            = decode(:2, -1, scope_id, :2)   
          and user_creator_id     = decode(:3, -1, user_creator_id, :3)   
          and priority_id         = decode(:4, -1, priority_id, :4)   
          and status_id           = decode(:5, -1, status_id, :5)   
          and user_responsible_id = decode(:6, -1, user_responsible_id, :6)   
      ) A
                      WHERE ROWNUM <= :LAST)
                WHERE :FIRST <= RNUM
    Note that placeholders: 1: 2,...: 5 appears 2 times in the query.

    Is there a more elegant way to say that *: 1 * must be replaced by in_filter_project_id, *: 2 * by in_filter_scope_id without having twice in the USING clause these variables? If this is not the case, why the placeholders have name, if you can only refer to their position (order)?

    Thanks for all replies.

    Hi Adam,.

    text taken from http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/11_dynam.htm

    Duplicate use of Placeholders

    Placeholders in a dynamic SQL statement associated with the arguments of bind in the USING clause of position, and not by name. Thus, if the same placeholder appears two times or more in the SQL statement, each appearance must correspond to a bind argument in the USING clause. For example, if the dynamic string

    sql_stmt := 'INSERT INTO payroll VALUES (:x, :x, :y, :x)';
    

    you could code the corresponding USING clause as follows:

    EXECUTE IMMEDIATE sql_stmt USING a, a, b, a;
    

    However, only the unique placeholders in a dynamic PL/SQL block are associated with bind arguments in the USING clause of position. Thus, if the same placeholder appears two times or more in a PL/SQL block, all appearances correspond to a single argument to bind in the USING clause. In the example below, the first unique placeholder (x) is associated with the first bind argument (one). Similarly, the second unique space reserved (y) is associated with the second argument to bind (b).

    DECLARE
       a NUMBER := 4;
       b NUMBER := 7;
    BEGIN
       plsql_block := 'BEGIN calc_stats(:x, :x, :y, :x); END;'
       EXECUTE IMMEDIATE plsql_block USING a, b;
       ...
    END;
    

    Hope this helps
    Christian Balz

  • Save the selected value from the ListBox with its respective values control tab dropdown selected in another list box

    Hi all

    I'm doing a vi where I save the selected value from the ListBox with values respective tab control dropdown selected in another list box. Whenever I select Item1 can change of course and the respective tab will be open for this element. But now I want to just save the selection and put it into another ListBox.SO I can't renmove or add my wishes. Please help me.

    It will work.

    Probably not the greatest solution well.

  • Replace special characters in a string

    Let's say that someone copies the list as follows and the glue in a Javascript dialog box:

    302304

    305678

    245675

    How do I manipulate the string so that it reads:

    302304 305678 245675

    In other words, how to replace manual line breaks in a string with spaces?

    Thank you!

    It's the cleanest method that you are looking for:

    /[\n\r]/
    

    In this case, even a simple \s would work, but it's maybe not what the OP...

    Substances

  • Replacing special characters when writing to a file

    I use the following to replace Muñoz (n with null).  It should produce as Muoz.

    This should be simple, but it does not work.  209 and 241 represent the upper and the lower case n.

    This statement is a CFFILE.  I'm generating the file but the n is still there.

    Replace (LGL_NM, Chr (209) & chr (241),'3 ', 'all')

    I also tried without success the following:

    < cfset x = ReplaceNoCase(#Object_query.) LGL_NM #, "#Chr (209) # ',' ', 'all') > '"
    < cfset LGL_NM = ReplaceNoCase (x, "#chr (241) #","", "all" "") >

    Help, please.

    Thank you!

    Bill



    #REReplaceNoCase (testString, "[#chr (209) ##chr (241) #]", "", "all") #.

Maybe you are looking for