Null-terminated multibyte strings
Aus cppreference.com
![]() | This page has been machine-translated from the English version of the wiki using Google Translate. The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Ein NULL-terminierten Multibyte-String (NTMBS) oder "Multibyte-String", ist eine Folge von null Byte von einem Byte mit dem Wert Null (das abschließende Nullzeichen), gefolgt .
Original:
A null-terminated multibyte string (NTMBS), or "multibyte string", is a sequence of nonzero bytes followed by a byte with value zero (the terminating null character).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Jedes Zeichen im String gespeichert einnehmen kann mehr als ein Byte. Die Codierung verwendet, um Zeichen in einem Multibyte-String vertreten ist locale-spezifischen: es kann UTF-8, GB18030, EUC-JP, Shift-JIS, etc. zum Beispiel, ist das char-Array {'\xe4','\xbd','\xa0','\xe5','\xa5','\xbd','\0'} ein NTMBS die String "你好" in UTF-8-Byte-Codierung: die ersten drei Bytes den Charakter 你 kodieren, codieren die nächsten drei Bytes den Charakter 好. Das gleiche Zeichenfolge in GB18030 codiert ist die char-Array {'\xc4', '\xe3', '\xba', '\xc3', '\0'}, wobei jedes der beiden Zeichen als ein Zwei-Byte-Sequenz kodiert wird .
Original:
Each character stored in the string may occupy more than one byte. The encoding used to represent characters in a multibyte character string is locale-specific: it may be UTF-8, GB18030, EUC-JP, Shift-JIS, etc. For example, the char array {'\xe4','\xbd','\xa0','\xe5','\xa5','\xbd','\0'} is an NTMBS holding the string "你好" in UTF-8 multibyte encoding: the first three bytes encode the character 你, the next three bytes encode the character 好. The same string encoded in GB18030 is the char array {'\xc4', '\xe3', '\xba', '\xc3', '\0'}, where each of the two characters is encoded as a two-byte sequence.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
In einigen Multibyte-Kodierungen kann jeder gegebenen Multibyte-Zeichen-Sequenz repräsentieren verschiedene Zeichen in Abhängigkeit von den vorherigen Byte-Sequenzen, wie "shift-Sequenzen" bekannt. Solche Codierungen als state-abhängige bekannt: die Kenntnis der aktuellen Schaltzustand wird benötigt, um jedes Zeichen zu interpretieren. Ein NTMBS ist nur gültig, wenn sie beginnt und endet in der ersten Schaltzustand: Wenn ein Schaltvorgang verwendet wurde, muss das entsprechende unshift Sequenz sein, bevor das abschließende Null-Zeichen vorhanden. Beispiele für solche Codierungen sind die 7-Bit JIS, BoCu-1 und SCSU .
Original:
In some multibyte encodings, any given multibyte character sequence may represent different characters depending on the previous byte sequences, known as "shift sequences". Such encodings are known as state-dependent: knowledge of the current shift state is required to interpret each character. An NTMBS is only valid if it begins and ends in the initial shift state: if a shift sequence was used, the corresponding unshift sequence has to be present before the terminating null character. Examples of such encodings are the 7-bit JIS, BOCU-1 and SCSU.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
A Multibyte Zeichenkette layout-kompatibel mit null-terminierte Byte-String (NTB), das heißt, kann gespeichert, kopiert, untersucht und über die gleiche Ausstattung, mit Ausnahme für die Berechnung der Anzahl der Zeichen. Wenn das korrekte locale ist in der Tat, I / O-Funktionen auch umgehen Multibyte Strings. : Multibyte-Strings können in und aus WideStrings mit den std::codecvt Elementfunktionen std::wstring_convert oder die folgenden locale-abhängige Umwandlung Funktionen umgewandelt werden
Original:
A multibyte character string is layout-compatible with null-terminated byte string (NTBS), that is, can be stored, copied, and examined using the same facilities, except for calculating the number of characters. If the correct locale is in effect, I/O functions also handle multibyte strings. Multibyte strings can be converted to and from wide strings using the std::codecvt member functions, std::wstring_convert, or the following locale-dependent conversion functions:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten]Multibyte / wide character Umbauten
definiert in Header <cstdlib> | |
gibt die Anzahl der Bytes in den nächsten Multibyte-Zeichens Original: returns the number of bytes in the next multibyte character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
wandelt die nächsten Multibyte Zeichen-Zeichen Original: converts the next multibyte character to wide character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
ein breites Charakter seiner Multibyte-Darstellung Original: converts a wide character to its multibyte representation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
wandelt einen schmalen Multibyte Zeichenkette breite String Original: converts a narrow multibyte character string to wide string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
wandelt eine breite Zeichenfolge Multibyte Zeichenkette einzugrenzen Original: converts a wide string to narrow multibyte character string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
definiert in Header <cwchar> | |
überprüft, ob die mbstate_t Objekt stellt ersten Schaltzustand Original: checks if the mbstate_t object represents initial shift state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
weitet sich ein Single-Byte engen Charakter-Zeichen, wenn möglich Original: widens a single-byte narrow character to wide character, if possible The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
verengt eine breite Charakter zu einem Single-Byte engen Charakter, wenn möglich Original: narrows a wide character to a single-byte narrow character, if possible The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
gibt die Anzahl der Bytes in den nächsten Multibyte-Zeichen, gegebenen Zustand Original: returns the number of bytes in the next multibyte character, given state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
wandelt die nächsten Multibyte Zeichen-Zeichen, gegebenen Zustand Original: converts the next multibyte character to wide character, given state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
wandelt eine breite Charakter seiner Multibyte-Darstellung, gegebenen Zustand Original: converts a wide character to its multibyte representation, given state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
wandelt einen schmalen Multibyte Zeichenkette breite Zeichenfolge mit dem angegebenen Zustand Original: converts a narrow multibyte character string to wide string, given state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
wandelt eine breite Zeichenfolge in schmale Multibyte Zeichenkette gegebenen Zustand Original: converts a wide string to narrow multibyte character string, given state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
definiert in Header <cuchar> | |
(C++11) | Erzeugen des nächsten 16-Bit-Zeichen aus einer schmalen Multibyte-String Original: generate the next 16-bit wide character from a narrow multibyte string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
(C++11) | konvertiert einen 16-Bit breiten Zeichen Multibyte-String einzugrenzen Original: convert a 16-bit wide character to narrow multibyte string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
(C++11) | erzeugen die nächsten 32-Bit-Zeichen aus einem engen Multibyte-String Original: generate the next 32-bit wide character from a narrow multibyte string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
(C++11) | konvertiert einen 32-Bit breiten Zeichen Multibyte-String einzugrenzen Original: convert a 32-bit wide character to narrow multibyte string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
[Bearbeiten]Types
definiert in Header <cwchar> | |
Konvertierungsstatus notwendigen Informationen, um Multibyte-Zeichenketten zu durchlaufen Original: conversion state information necessary to iterate multibyte character strings The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) |
[Bearbeiten]Makros
definiert in Header <climits> | |
MB_LEN_MAX | maximale Anzahl von Bytes in einer Multibyte-Zeichens Original: maximum number of bytes in a multibyte character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Makro konstant) |
definiert in Header <cstdlib> | |
MB_CUR_MAX | maximale Anzahl von Bytes in einer Multibyte-Zeichen in der aktuellen C locale (Makro-Variablen) Original: maximum number of bytes in a multibyte character in the current C locale (Makro-Variablen) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
definiert in Header <cuchar> | |
__STDC_UTF_16__ | zeigt an, dass UTF-16 Kodierung mbrtoc16 und c16rtomb verwendet wird Original: indicates that UTF-16 encoding is used by mbrtoc16 and c16rtomb The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Makro konstant) |
__STDC_UTF_32__ | zeigt an, dass UTF-32 Kodierung mbrtoc32 und c32rtomb verwendet wird Original: indicates that UTF-32 encoding is used by mbrtoc32 and c32rtomb The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Makro konstant) |