This should work, although there may be a more efficient way:
SQL> create table ascii_test(
2 ascii_strng varchar2(40)
3 );
Table created.
SQL>
SQL> insert into ascii_test
2 values('asdfjkl'||chr(160)||'uop'||chr(234)||'itrs');
1 row created.
SQL>
SQL> insert into ascii_test
2 values('asdfjkl'||chr(140)||'uopitrs'||chr(244));
1 row created.
SQL>
SQL> insert into ascii_test
2 values('asdfjkl'||chr(167)||'u'||chr(177)||'opitrs');
1 row created.
SQL>
SQL> insert into ascii_test
2 values('asdfjkl'||chr(128)||'uopitrs');
1 row created.
SQL>
SQL> insert into ascii_test
2 values('asdfjkl'||chr(133)||'uopit'||chr(218)||'rs');
1 row created.
SQL>
SQL> select ascii_strng
2 from ascii_test;
ASCII_STRNG
----------------------------------------
asdfjkláuopΩitrs
asdfjkl┐uopitrs⌠
asdfjklºu▒opitrs
asdfjkl┐uopitrs
asdfjkl┐uopit┌rs
SQL>
SQL> begin
2 for i in 128..255 loop
3 update ascii_test
4 set ascii_strng = replace(ascii_strng, chr(i),
'_')
5 where instr(ascii_strng, chr(i)) > 0;
6 end loop;
7 commit;
8 end;
9 /
PL/SQL procedure successfully completed.
SQL>
SQL> select ascii_strng
2 from ascii_test;
ASCII_STRNG
----------------------------------------
asdfjkl_uop_itrs
asdfjkl_uopitrs_
asdfjkl_u_opitrs
asdfjkl_uopitrs
asdfjkl_uopit_rs
SQL>
You might not want to replace all of the unprintable characters with
the same printable representation, but it does show how you can
replace multiple uprintable characters in a single string.
David Fitzjarrell