腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
搜索
关闭
文章
问答
(427)
视频
开发者手册
清单
用户
专栏
沙龙
全部问答
原创问答
Stack Exchange问答
更多筛选
回答情况:
全部
有回答
回答已采纳
提问时间:
不限
一周内
一月内
三月内
一年内
问题标签:
未找到与 相关的标签
筛选
重置
1
回答
std::
codecvt
和std::
codecvt
_utf8有什么区别?
std::
codecvt
和std::
codecvt
_utf8之间到底有什么区别?正如STL引用中所说的,std::
codecvt
_utf8是来自std::
codecvt
的驱动类,但是您能告诉我为什么这个函数会抛出异常吗?std::wstring_convert<std::
codecvt
<wchar_t, char, std::mbstate_t>> cvtUtf8 { new std::
codecvt
_byname<wchar_t, char, std::m
浏览 2
修改于2018-03-05
得票数 2
回答已采纳
4
回答
废弃报头<
codecvt
>替换
因此,我搜索了将UTF-8转换为UTF-16的常用方法,并发现应该使用<
codecvt
>中的模板。 但是现在,当它是时,我想知道执行相同任务的新的共同方式是什么?
浏览 32
修改于2017-11-27
得票数 90
回答已采纳
2
回答
如何编写std::
codecvt
facet?
如何编写std::
codecvt
facet?
浏览 3
提问于2010-06-04
得票数 13
回答已采纳
3
回答
Codecvt
不适用于gcc
我正在尝试使用我自己的
codecvt
和标准的iostreams。我用这句话:rot13
codecvt
只是一个例子,无耻地从 中删除了它从未调用自定义
codecvt
类中的任何函数。但它在VS2012中运行得很好。我做错了什么?
浏览 3
提问于2015-02-04
得票数 2
回答已采纳
1
回答
如何检查新建
codecvt
_byname是否成功
有没有一个标准的方法来检查新的std::
codecvt
_byname构建是否成功?我正在试验下面的程序: // cl /nologo /Fetest_
codecvt
_byname.exe /EHsc test_
codecvt
_byname.cpp && test_
codecvt
_byname// g++ -o test_
codecvt
_byname test_
codecvt
_byname.cpp &am
浏览 3
修改于2011-11-28
得票数 0
回答已采纳
2
回答
linux中的
codecvt
头文件替换
我在window中运行以下代码: #include <
codecvt
>{ myfile.imbue(std::locale(myfile.getloc(),new std::
codecvt
_utf16<wchar_t, 0xffff, consume_header>)); } 我想编译的代码在linux,但"
codecvt
“头文件是不支持和获取<
浏览 29
提问于2013-08-27
得票数 2
2
回答
std::
codecvt
_utf8方面的问题
下面是使用std::
codecvt
_utf8<> facet将wchar_t转换为UTF-8的代码片段。在Visual 2012中,我的期望没有得到满足(请参阅代码末尾的条件)。我的期望是错的吗?#include <locale>#include <cstdlib> { std::locale loc (std::locale (), new st
浏览 2
修改于2013-10-18
得票数 5
回答已采纳
1
回答
使用ICU实现我自己的
codecvt
方面
我想要实现一个
codecvt
方面使用ICU从任何字符编码( ICU支持)转换为UTF-8内部。我知道
codecvt
_byname是存在的,它可以用于实现我想要的部分内容,如所示。相反,我想要一个单一的流,比如:ifstream ifs;icu_
codecvt
::result icu_
codecvt
::d
浏览 5
修改于2011-12-30
得票数 0
1
回答
std::
codecvt
::do_in方法重载与其他基本方法
我已经重载了do_in方法的std::
codecvt
#include <locale>public: explicit
codecvt
_to_upper(size_t r= 0) : std::
codecvt
<cha
浏览 1
修改于2014-03-28
得票数 0
回答已采纳
2
回答
boost::filesystem3::path::
codecvt
()未定义引用
/myfile-g.o: In function `boost::filesystem3::path::
codecvt
()':`boost::filesystem3::path::wchar_t_
codecvt
_facet()'这是在哪里定义的?
浏览 0
修改于2011-03-11
得票数 1
回答已采纳
1
回答
codecvt
_utf8<wchar_t>被转换为本机
codecvt
<wchar_t,char>
函数本身并不是问题所在,问题是当我像这样调用这个函数时:m_utf8 += to_bytes<
codecvt
_utf8<wchar_t>>(_Wptr, _Wptr + wstr.size()); 它实际上并不使用
codecvt
_utf8<wchar_t> (它在本机wchar_t和utf-8之间进行转换),而是使用
codecvt
<wchar_t
浏览 1
提问于2014-02-07
得票数 0
回答已采纳
1
回答
travis gcc构建failling“
codecvt
”文件未找到
我正在尝试将自动构建添加到我的中,但是我得到了错误fatal error: '
codecvt
' file not foundsudo: required dist
浏览 3
提问于2016-09-09
得票数 1
回答已采纳
1
回答
为什么std::
codecvt
只被文件I/O流使用?
我一直在实现一个
codecvt
,用于处理输出流的标识。只是没有调用std::
codecvt
的任何成员函数。此外,有没有人知道我可以依靠哪种结构来实现缩进?这使我更加困惑为什么std::
codecvt
并不是所有输出流都使用的隐式。要么我对流在C++中的工作方式有一些根本的误解,要么std::
co
浏览 2
修改于2020-11-24
得票数 9
回答已采纳
2
回答
Qt <
codecvt
>:没有这样的文件目录
我不能在Qt5.1中使用std::wstring_convert,因为它告诉我<
codecvt
>:没有这样的文件目录。我能做什么?我不知道。这段代码在MSVC 2013上运行。
浏览 1
提问于2014-05-02
得票数 1
1
回答
从UTF-8转换为UTF-16的"
codecvt
_utf8_utf16“和"
codecvt
_utf8”的区别
我遇到了两个代码片段和, std::wstring str = std::wstring_convert<std::
codecvt
_utf8<wchar_t>>().from_bytes("
浏览 1
提问于2019-08-24
得票数 1
回答已采纳
1
回答
将字符串转换为char *失败(
codecvt
)
我有以下代码:std::wstring_convert<std::
codecvt
_utf8<wchar_t> > my_conv; const
浏览 0
修改于2020-10-15
得票数 0
回答已采纳
2
回答
将C++ std::wstring转换为utf8和std::
codecvt
_xxx
C++11有将宽字符字符串std::wstring从/转换到utf8表示的工具:std::
codecvt
、std::
codecvt
_utf8、std::
codecvt
_utf8_utf16等。
浏览 4
修改于2016-05-30
得票数 4
1
回答
当第三个模板参数不是std::mbstate_t时,专门化
codecvt
:链接器错误
给定的struct R{ void operator()(Q*) { } }; const char *r; char *t; Q* _q; std::use_facet<std::
codecvt
char, Q*> >(std::locale(std::locale::classic(), new
浏览 10
提问于2011-11-28
得票数 1
回答已采纳
1
回答
把std::wstring_convert<std::
codecvt
_utf8<wchar_t>>?放在哪里?
为了与Win-API交互,我决定使用.to_bytes()和.from_bytes()函数,这些函数来自<
codecvt
>和<locale>的std::wstring_convert<std::
codecvt
_utf8#include <
codecvt
>{ extern std::wstring_convert<std::
codecvt
_utf8_utf16<wchar_t>&
浏览 2
修改于2017-03-11
得票数 2
回答已采纳
1
回答
为什么
codecvt
不能将BMP外部的unicode转换为u16string?
代码:#include <string>#include <
codecvt
> string a = "\U00010000z"; u16string b; u16
浏览 1
提问于2022-02-14
得票数 0
回答已采纳
第 2 页
第 3 页
第 4 页
第 5 页
第 6 页
第 7 页
第 8 页
第 9 页
第 10 页
第 11 页
点击加载更多
领券