wchar.h is a header file in the C standard library. It is a part of the extension to the C programming language standard done in 1995. It contains extended multibyte and wide character utilities. The standard header
Questions tagged [wchar]
196 questions
0
votes
2 answers
How to convert 'const wchar*' to 'const char*' on Mac OS X?
Is there a elegant way to convert 'const wchar *' to 'const char *' on Mac OS X?
Kat

kyue
- 143
- 3
- 8
0
votes
1 answer
Crystax wcsncasecmp was not declared in this scope
I'm making a android app with crystax Improved Android NDK, and I did it:
#include
wcsncasecmp(L"", L"", 0);
and I getting the follow error:
jni/MooveBike.cpp:30:34: error: 'wcsncasecmp' was not declared in this scope
what i did wrong?

ademar111190
- 14,215
- 14
- 85
- 114
0
votes
2 answers
How to use Loadstring to load Chinese Characters
I have a string table which defines a string in Chinese like this:
STRINGTABLE
LANGAUGE 0x0C04, 0x03
BEGIN
1000 "检查环境..."
...
END
I am trying to load that string into a wchar_t buffer as follows:
#define UNICODE
#define…

user1202422
- 558
- 2
- 8
- 16
0
votes
2 answers
wchar/char variables
I am working in two different versions of c++ (builder 2009 and XE1).
In both I need to use the same file f.cpp, which contains function LoadLibrary("path").
Builder 2009 requires path of type char and XE1 - wchar, so this invokes error.
Is there…

Onic
- 11
- 1
0
votes
1 answer
Converting char to wide char
I am trying to converts a sequence of multibyte characters to a corresponding sequence of wide characters using the mbstowcs_s function. But I keep having the following heap corruption problem. Can anyone tell me how to fix that?
Here is a sample…

Yuchen
- 30,852
- 26
- 164
- 234
0
votes
2 answers
Wchar_t to string Conversion
I want to convert the strFileNotifyInfo[1].FileName(Wchar_t) to a string so that i can see the filepath. but i can't make it work.
Here is my code:
while(TRUE)
{
if( ReadDirectoryChangesW( hDir, (LPVOID)&strFileNotifyInfo,…

user1812707
- 67
- 1
- 7
0
votes
2 answers
Difference and conversions between wchar_t for Linux and for Windows
I understand from this and this thread that in Windows, wchar_t is 16-bit & for Linux, wchar_t is 32 bit.
I have a client-server architecture (using just pipes - not sockets)- where my server is Windows based and client is Linux.
Server has a API to…

sskanitk
- 475
- 4
- 11
- 19
0
votes
3 answers
Reading CJK characters from an input file in C
I have a text file which can contain a mix of Chinese, Japanese, Korean (CJK) and English characters. I have to validate the file for English characters. The file can be allowed to contain CJK characters only when a line begins with the '$'…

Manik Sidana
- 2,005
- 2
- 18
- 29
0
votes
2 answers
How to convert wchar_t (or wchar_t* or CORBA::WChar*) to string?
In my app I have to use CORBA::WChar* (or equivalent wchar_t*) but my program also needs to save some information to the PostgreSQL database. To insert data to PostgreSQL in C++ I use SOCI. And there's the problem because :
The following types are…

Brian Brown
- 3,873
- 16
- 48
- 79
0
votes
1 answer
Unicode characters not shown correctly
I am making a C program that supports many languages. The program send emails using the type WCHAR instead of char. The problem is that when I receive the email and read it, some characters are not shown correctly, even some English ones like e, m,…

fred
- 1
0
votes
1 answer
Compare a wchar string from a vector with an other specified wchar string
@pmr: Look at the code below
@singeroftheall: I have with both things problems. Inserting and searching. I think the searching part is done. Now how can I insert my mac adresses in the vector ?
My Adresses are saved in the varable…

Kipcak08
- 313
- 2
- 4
- 13
0
votes
2 answers
how implement function work as sprintf use wchar for parameter?
l used ANDROID NDK 。so l want to format something。just use sprintf,but l can not use it with
wchar_t. is there some helps for me?

nightday
- 1
- 1
- 1
-1
votes
1 answer
How to convert wchar_t to multi-bytes char in C
I'm looking for a way to convert wchar_t to multi-bytes char, without using wctomb or any ready-made routine. I have to do that in C, not C++, and the interoperability doesn't matter here.
My goal is to print wchar byte by byte using the write…

Kap Merang
- 9
- 2
-1
votes
2 answers
How do you combine two char_t* strings?
What I am trying to do is get a list of processes in an edit child window. I originally was gonna use a series of buttons with a scroll bar but I don't know how to do that (if you have a solution for that) and found no resources how to.
I tried…
user11343815
-1
votes
2 answers
How to print wchar_t variables in C
I am debugging some old C code written in our company. The function is something like this --
uint32
ExecuteCommand(wchar_t *dnsName, // IN
wchar_t *dnsUser, // IN
…

user496934
- 3,822
- 10
- 45
- 64