Questions tagged [widestring]
112 questions
0
votes
1 answer
Why buffer is getting garbage value?
This code from my project. I am not able to understand from where buffer is getting this (潓敭慮敭(10):) garbage value after using with swprintf_s.
const char* m_filename = "Somename";
unsigned m_line = 10;
wchar_t buffer[256];
…

Pranit Kothari
- 9,721
- 10
- 61
- 137
0
votes
1 answer
Type Library WideString to String
I have a dll built in C# and I consume it using Delphi XE2 by typelibrary. Works correctly but I have a function that return a WideString and should be returned a name with special chars like 'çãé' (i from Brazil) but the result is "???".
How can I…
0
votes
1 answer
How to convert raw MBCS strings (SHIFT-JIS) from windows to UTF-8 on linux
I'm writing a program on Linux that has to interface with a existing windows program. I cannot modify the way the windows program works, but I must integrate with the existing data. This program will receive raw data structures over a TCP network…

Zoccadoum
- 862
- 1
- 10
- 16
0
votes
2 answers
Passing file path in Delphi from TOpenDialog as a string
I'm trying to make use of the TOpenDialog in order to pass the path to selected file to the AdoConection and load the content of the Excel file to the table. I'm currently attempting the code below but the last part of the code does not connect to…

Konrad
- 17,740
- 16
- 106
- 167
0
votes
1 answer
Thousand separator with wide/unicode stream
May be the best way to describe, what I would like to achieve, is to combine solutions from following threads:
Windows Unicode C++ Stream Output Failure (but with utf-16)
and
How to print a number with a space as thousand separator? (but with dot…

Andrey Pro
- 501
- 1
- 10
- 22
0
votes
1 answer
Boost.Log ignores overloaded stream insertion operator
I have a class that I want to appear in log in a certain way, so I've overloaded its << operator:
class CWindowClassId
{
public:
// ...
friend std::wostream& operator<< (std::wostream& os, CWindowClassId const& classId);
}
Inserting the…

lambdas
- 3,990
- 2
- 29
- 54
0
votes
6 answers
Delphi, string vs widestring memory usage issue, non-unicode VCL (D7)
I'm storing some classes with WideString parameters describing them (like name, description and some others). Now if I change all those WideStrings to simple "string" (I'm using alias actually so I have to change one line only), memory usage is…

migajek
- 8,524
- 15
- 77
- 116
0
votes
3 answers
Where is wctype in Visual C 2008 Express?
I'm porting 3rd party software from Linux to Windows using Visual C 2008 Express.
I have trouble only with function `wctype'. It's declared in %VCDIR%/include/wctype.h file as follow:
_MRTIMP2 wctype_t __cdecl wctype (const char *);
But, when…
AlannY
0
votes
1 answer
How to specify } (Closing brace) in boost regular expression?
I am using boost 1.54 library in my program. My task is to expand some patterns in a string.
One such instance is if a closing brace } is found in the string replace it with >
I had written the following regex in my code.
boost::wregex…

Ravi Chandra
- 677
- 12
- 24
0
votes
1 answer
wide strings in php?
Originally, I had the problem that, although I had the same path by optical inspection, file_exists() returned true for one and false for the other. After spending hours narrowing down my problem, I wound up with the following code... (paths…

Silly Freak
- 4,061
- 1
- 36
- 58
0
votes
1 answer
Wide String vs String , Does it affect performance in Windows C++
I'm handling a lot of Unicode file paths in my C++ project. I peform a check in my code , if they are fine enough to fit in Multibyte String , i keep it as a normal string (std::string) variable,where else if the string doesn't fit in Multibyte i…

Manikandaraj Srinivasan
- 3,557
- 5
- 35
- 62
0
votes
1 answer
how to streamout wide string from richedit control?
This is my attempt and I don't know why EM_STREAMOUT returns question marks when encountering non-ascii chars.
This code copies text from window and put it back again but this time as question marks only.
#include
#include…

rsk82
- 28,217
- 50
- 150
- 240
0
votes
1 answer
narrowing conversion warning in boost's regex_traits_defaults.hpp when trying to initialize wregex object
The first line compiles ok. The second also produces working EXE, but in addition I get this large error:
In file included from d:\boost/boost/regex/v4/regex_traits.hpp:35:0,
from d:\boost/boost/regex/regex_traits.hpp:27,
…

rsk82
- 28,217
- 50
- 150
- 240
0
votes
1 answer
How can I test my WideReplace function?
OS: Hungarian Windows (Windows 1250)
Under Delphi 6 Prof there is no WideStringPos, WideStringCopy, WideStringReplace...
But in an XML based project I need to use them.
Because that I tried to write "something like" these functions.
But I'm not sure…

durumdara
- 3,411
- 4
- 43
- 71
0
votes
1 answer
C++ Builder XE2: How to convert String to a wchar_t*
I have the SHBrowseForFolder to popup and work fine, but I would like to set the Title. I know it has to be a wchar_t* and when I use a const like (wchar_t*)L"My Title" the title is shown correct.
But if I try to use a String value I only get the…

Max Kielland
- 5,627
- 9
- 60
- 95