问题标签 [wchar-t]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
iphone - 基本字符串UTF16 编码到 NSString
basic_string<wchar_t>
从具有 UTF16 编码的 C++ 对象转换为 Objective-C NSString 对象的最佳方法是什么?
我可以像这样从 wchar_t* 转换为 char* 并且仍然让 stringWithCString 正确使用字符串吗?
谢谢你,谢恩
c# - 将 wchar_t 转换为 Char
我需要转换:
至
转换在 DLL(用 C++ 编写)中完成,我希望arr
在 Windows 窗体(用 C# 编写)中向用户显示 的值。
是否可以直接wchar_t
在文本框中显示,或者我应该在 DLL 中转换wchar_t
为char
,然后在 Windows 窗体中转换char
为?string
这种转换是如何完成的?
c++ - 重载 wstring 和 wchar_t 中的类似转换 *
我有以下代码:
我得到:
wstring 和 wchar_t * 之间不应该有任何隐式转换(应该吗?),那么为什么会有这些歧义呢?
先感谢您
oracle - OCI、OCILIB、ODBC 宽字符(wchar)支持
这些库中的哪些 OCI、OCILIB、ODBC 或任何其他支持宽字符串 (wchar)?
printing - char16_t 打印
wchar_t
最近,由于这些平台之间的大小差异,我在将 Windows 应用程序移植到 Linux 时遇到了问题。我尝试使用编译器开关,但打印这些字符时出现问题(我认为 GCCwcout
认为所有字符wchar_t
都是 32 位的)。
所以,我的问题是:有什么好方法(w)cout
char16_t
吗?我问是因为它不起作用,我被迫将其转换为wchar_t
:
这似乎不是一个大问题,但它困扰着我。
c++ - 如何在不丢失数据的情况下将 wchar_t* 转换为 char*?
我正在使用日语字符串作为wchar_t
,我需要将其转换为char*
. 是否有任何方法或功能可以wchar_t*
在char*
不丢失数据的情况下进行转换?
c++-cli - Reading Byte Data through the serial port in C++/CLI
I am trying to make an interface with another program so I have to use C++.
It's been years since I have programmed in C++ and I have been at this problem for about a week so I'm slowly starting to see how everything works.
I want to read byte data coming from a serial port device.
I have verified that I can get text through the serial port using the readline command:
For example:
Is how the data is read in an example from MSDN that I got to work successfully.
However I have tried to modify it several times and I'm having no luck coming up with something that reads the data as bytes. (I already have conversion of byte data to string so I can actually see the bytes such as the number 15 equaling 0f in bytes.)
Modifying the code to
gives me
I'm not familiar with Readline
. Is it only for strings? I have verified that it does work with strings and if I use a serial device that sends a string the first set of code does work.
Can someone explain what method I could use to read byte data? Thanks.
c++ - 使用 _wtol 进行小数转换
_wtol 函数将宽字符串转换为长字符串。问题是它不能用小数转换。我不知道足够多的 C++ 来提出解决方法,所以有人可以建议一种解决方法或替代转换函数来转换小数点吗?
谢谢
.net - 如何将 System::Int32 转换为 wchar_t*
我有这段代码:
int
到 const之间的转换不正确wchar_t*
。如何处理这个错误?