本文整理汇总了C++中icu::UnicodeString::toUTF8String方法的典型用法代码示例。如果您正苦于以下问题:C++ UnicodeString::toUTF8String方法的具体用法?C++ UnicodeString::toUTF8String怎么用?C++ UnicodeString::toUTF8String使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类icu::UnicodeString
的用法示例。
在下文中一共展示了UnicodeString::toUTF8String方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: semantic_error
// --------------------------------------------------------------------------
void
processor::on_start_tag_type (
icu::UnicodeString const& type
)
// --------------------------------------------------------------------------
{
element_info info;
if (!m_character_data.isEmpty())
{
character_data(m_character_data);
m_character_data.remove();
}
info.type = type;
info.child_counter = 0;
if (m_element_info.empty())
{
if (m_validating
&& !m_document_type.m_root_type.isEmpty()
&& type != m_document_type.m_root_type)
{
std::string msg;
msg += "Root element type does not match the document type.\n";
msg += "Document type name: ";
m_document_type.m_root_type.toUTF8String(msg);
msg += "\nRoot element type: ";
type.toUTF8String(msg);
throw semantic_error(msg);
}
info.xmlns[""] = uri();
info.base = m_base_iri;
info.space = false;
}
else
{
if (m_validating)
{
throw not_implemented("Element validity checking.");
}
++m_element_info.top().child_counter;
info.xmlns = m_element_info.top().xmlns;
info.base = m_element_info.top().base;
info.lang = m_element_info.top().lang;
info.space = m_element_info.top().space;
}
m_element_info.push(info);
m_sax_attrs.clear();
}