Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

UTL_RAW , 12 of 22


TRANSLITERATE Function

This function converts the bytes in the input RAW r according to the bytes in the transliteration RAWs from_set and to_set. Successive bytes in r are looked up in the from_set, and, if not found, copied unaltered to the result RAW. If found, then they are replaced in the result RAW by either corresponding bytes in the to_set, or the pad byte when no correspondence exists.

Bytes in r, but undefined in from_set, are copied to the result. Only the first (leftmost) occurrence of a byte in from_set is used. Subsequent duplicates are not scanned and are ignored. The result RAW is always the same length as r.

If the to_set is shorter than the from_set, then the pad byte is placed in the result RAW when a selected from_set byte has no corresponding to_set byte (as if the to_set were extended to the same length as the from_set with pad bytes).


Note:

Difference from TRANSLATE:

- r bytes undefined in to_set are padded.

- Result RAW is always same length as input RAW r


Syntax

UTL_RAW.TRANSLITERATE (
   r        IN RAW,
   to_set   IN RAW DEFAULT NULL,
   from_set IN RAW DEFAULT NULL,
   pad      IN RAW DEFAULT NULL)
  RETURN RAW;

Pragmas

pragma restrict_references(transliterate, WNDS, RNDS, WNPS, RNPS); 

Parameters

Table 80-16 TRANSLITERATE Function Parameters
Parameter  Description 
r
 

RAW input byte-string to be converted. 

from_set
 

RAW byte-codes to be converted, if present in r (any length). 

to_set
 

RAW byte-codes to which corresponding from_set bytes are converted (any length). 

pad
 

1 byte used when to-set is shorter than the from_set

Defaults and Optional Parameters

Table 80-17 TRANSLITERATE Function Optional Parameters
Optional Parameter  Description 
from_set
 

x'00 through x'ff. 

to_set
 

To the NULL string and effectively extended with pad to the length of from_set as necessary. 

pad
 

x'00'. 

Returns

Table 80-18 TRANSLITERATE Function Returns
Return  Description 
RAW
 

Converted byte-string. 

Errors

Table 80-19 TRANSLITERATE Function Errors
Error  Description 
VALUE_ERROR
 

R is NULL and/or has 0 length. 


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback