Null-terminated multibyte strings
De 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. |
<metanoindex/>
Uma seqncia multibyte terminada em nulo (NTMBS), ou "string multibyte", uma seqncia de bytes diferentes de zero seguido por um byte com o valor zero (o caractere nulo de terminao).
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.
Cada personagem armazenada na string pode ocupar mais de um byte. A codificao usada para representar caracteres em uma seqncia de caracteres multibyte localidade especfica: pode ser UTF-8, GB18030, EUC-JP, Shift-JIS, etc Por exemplo, a matriz de char
{'\xe4','\xbd','\xa0','\xe5','\xa5','\xbd','\0'} um NTMBS segurando a corda "" na codificao UTF-8 multibyte: os trs primeiros bytes codificar o personagem, nos prximos trs bytes codificar o personagem. A mesma cadeia codificada em GB18030 o {'\xc4', '\xe3', '\xba', '\xc3', '\0' matriz de char}, onde cada um dos dois personagens codificado como uma sequncia de dois bytes.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.
Em algumas codificaes multibyte, qualquer sequncia de caracteres multibyte dado pode representar caracteres diferentes, dependendo das seqncias de bytes anteriores, conhecidos como "seqncias de turnos". Tais codificaes so conhecidos como dependente do estado: conhecimento do estado atual mudana necessria para interpretar cada personagem. Um NTMBS s vlido se ele comea e termina no estado deslocamento inicial: se uma sequncia mudana foi usado, a seqncia unshift correspondente tem de estar presente antes do caractere nulo de terminao. Exemplos de tais codificaes so as JIS 7 bits, BOCU-1 e 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.
Uma cadeia de caracteres multibyte layout compatvel com terminao nula seqncia de bytes (BNP), isto , podem ser armazenados, copiados e analisados utilizando as mesmas instalaes, exceto para o clculo do nmero de caracteres. Se o local correto , com efeito, I / O funciona tambm lidar com cordas de vrios bytes. Cadeias de bytes mltiplos pode ser convertido para e a partir de cordas de largura, utilizando as funes std::codecvt membros, std::wstring_convert, ou as seguintes funes de converso dependente de localidade:
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.
Multibyte / converses de caracteres
Defined in header
<cstdlib> | |
retorna o nmero de bytes no caractere multibyte seguinte 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. (funo) | |
converte o caractere multibyte ao lado de caracteres largos 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. (funo) | |
converte um caractere largo em sua representao multibyte 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. (funo) | |
converte uma cadeia de caracteres multibyte estreita para string de largura 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. (funo) | |
converte uma cadeia de largura para estreitar cadeia de caracteres multibyte 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. (funo) | |
Defined in header
<cwchar> | |
Verifica se o objeto mbstate_t representa o estado deslocamento inicial 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. (funo) | |
alarga um caractere de byte nico estreita ao carter amplo, se possvel 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. (funo) | |
restringe um carter amplo para um caractere de byte nico estreita, se possvel 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. (funo) | |
retorna o nmero de bytes no caractere multibyte seguinte, determinado estado 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. (funo) | |
converte o caractere multibyte ao lado de carter amplo, determinado estado 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. (funo) | |
converte um caractere largo em sua representao multibyte, determinado estado 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. (funo) | |
converte uma cadeia de caracteres multibyte estreita para string de largura, determinado estado 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. (funo) | |
converte uma cadeia ampla de cadeia de caracteres multibyte estreita, dado estado 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. (funo) | |
Defined in header
<cuchar> | |
(C++11) |
gerar o caractere de 16 bits de largura prximo de uma string multibyte estreito 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. (funo) |
(C++11) |
converte um caractere de 16 bits de largura para estreitar string multibyte 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. (funo) |
(C++11) |
gerar o personagem de 32 bits de largura prximo de uma string multibyte estreito 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. (funo) |
(C++11) |
converte um caractere de 32 bits de largura para estreitar string multibyte 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. (funo) |
Tipos
Defined in header
<cwchar> | |
informao de converso de estado necessrio para repetir seqncias de caracteres multibyte 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. (classe) | |
Macros
Defined in header
<climits> | |
MB_LEN_MAX |
nmero mximo de bytes em um caractere multibyte 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. (macro constante) |
Defined in header
<cstdlib> | |
MB_CUR_MAX |
nmero mximo de bytes em um caractere multibyte na atual C locale
(varivel macro) Original: maximum number of bytes in a multibyte character in the current C locale (varivel macro) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Defined in header
<cuchar> | |
__STDC_UTF_16__ |
indica que a codificao UTF-16 usada por mbrtoc16 e c16rtomb 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. (macro constante) |
__STDC_UTF_32__ |
indica que a codificao UTF-32 usada por mbrtoc32 e c32rtomb 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. (macro constante) |