---
title: "HTMLENCODE"
description: "Die SQL-Funktion HTMLENCODE gibt den Eingabetext als HTML kodiert zur\u00FCck, wobei Sonderzeichen durch ihre HTML-Darstellung ersetzt werden."
language: de
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/de/docs/invantive-universalsql/grammar/sql-functions/htmlencode
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/htmlencode
updated: 2026-12-02T12:10:11Z
license: https://documentation.invantive.eu/de/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> HTMLENCODE[HTMLENCODE]:::quoted
    HTMLENCODE --> End((END))
```

## Anwendung
Die SQL-Funktion `HTMLENCODE` gibt den Eingabetext als HTML kodiert zurück, wobei Sonderzeichen durch ihre HTML-Darstellung ersetzt werden.

Siehe auch [[HTMLDECODE]].

Parameter:
- Eingabe (`varchar2`): Die Eingabe, die aus Text in HTML umgewandelt wird.

Gibt Folgendes zurück: Einen Text, bei dem es sich um die als HTML kodierte Eingabe in der Form `varchar2` handelt.

## Beispiele
Das folgende Beispiel ruft die HTML-Darstellung eines Textes ab:
```sql
select htmlencode('Big Spender & Johnson has > output than ACME')

----------------
Big Spender &amp; Johnson has &gt; output than ACME
```
Im folgenden Beispiel wird ein Text mit Tags und Anführungszeichen als HTML kodiert:
```sql
select htmlencode('<b>"bold"</b>')

----------------
&lt;b&gt;&quot;bold&quot;&lt;/b&gt;
```

