M
Martin B.
Hi!
This is a poll to get *short* opinions on the planned literal type for
the UTF-8 string literals in C++0x. (Please, no Unicode lectures ;-)
The current draft for C++0x specifies for UTF-8 string literals:
( http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3126.pdf )
[N3126, p28, §2.14.5]
[Item 6] A string literal that begins with u8, such as u8"asdf",
is a UTF-8 string literal [...]
[Item 7] Ordinary string literals and UTF-8 string literals are
also referred to as narrow string literals. A narrow
string literal has type "array of n const char" [...]
Compare this with the wide character types:
[N3126, p28, §2.14.5]
[Item 8] A string literal that begins with u, such as u"asdf",
is a char16_t string literal. A char16_t string
literal has type "array of n const char16_t" [...]
[Item 9] A string literal that begins with U, such as U"asdf",
is a char32_t string literal. A char32_t string literal
has type "array of n const char32_t" [...]
QUESTION: For the upcoming UTF-8 string literals, which type would you
prefer?
a) The current proposal, "array of n const char" is great!
b) "array of n const unsigned char" would be better!
(Because I'm using libxml2 ;-)
c) FCS! Add a distinct char8_t and make u8 literals use that!
thanks a lot!
br,
Martin
This is a poll to get *short* opinions on the planned literal type for
the UTF-8 string literals in C++0x. (Please, no Unicode lectures ;-)
The current draft for C++0x specifies for UTF-8 string literals:
( http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3126.pdf )
[N3126, p28, §2.14.5]
[Item 6] A string literal that begins with u8, such as u8"asdf",
is a UTF-8 string literal [...]
[Item 7] Ordinary string literals and UTF-8 string literals are
also referred to as narrow string literals. A narrow
string literal has type "array of n const char" [...]
Compare this with the wide character types:
[N3126, p28, §2.14.5]
[Item 8] A string literal that begins with u, such as u"asdf",
is a char16_t string literal. A char16_t string
literal has type "array of n const char16_t" [...]
[Item 9] A string literal that begins with U, such as U"asdf",
is a char32_t string literal. A char32_t string literal
has type "array of n const char32_t" [...]
QUESTION: For the upcoming UTF-8 string literals, which type would you
prefer?
a) The current proposal, "array of n const char" is great!
b) "array of n const unsigned char" would be better!
(Because I'm using libxml2 ;-)
c) FCS! Add a distinct char8_t and make u8 literals use that!
thanks a lot!
br,
Martin