UNICODE_TO_BLOB
Sintassi
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> UNICODE_TO_BLOB[UNICODE_TO_BLOB]:::quoted
UNICODE_TO_BLOB --> End((END))
Scopo
La funzione SQL UNICODE_TO_BLOB converte un valore in un blob. Il testo viene interpretato come UTF-16.
Vedi anche ASCII_TO_BLOB, HEX_TO_BLOB e TO_BINARY.
Parametri:
- Input (
varchar2): valore da convertire.
Restituisce: il valore di input convertito in un blob.
Esempi
L'esempio seguente converte il testo hi in un blob con la rappresentazione UTF-16 e recupera la lunghezza in byte; ogni carattere occupa due byte:
select length(unicode_to_blob('hi'))
-------------------
4
L'esempio seguente converte un testo in un blob con la rappresentazione UTF-16 e recupera il valore codificato in BASE64:
select base64_encode(unicode_to_blob('This is a base64 test'))
--------------------------------------------------------
VABoAGkAcwAgAGkAcwAgAGEAIABiAGEAcwBlADYANAAgAHQAZQBzAHQA