🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2130

Re: Storing UNICODE in mixed string resource

#2130
From: poojo hackma
Date: Tue, 10 Apr 2007 13:37
20 lines
1739 bytes
Hi Mike,

Have you tried using TCHAR instead of the familiar "char" and LPTSTR instead 
of LPSTR or "char*"?

Both TCHAR and LPTSTR can handle either a char or a wchar, depending on the 
way the project is compiled. Not sure if that will solve your problem, but 
we've started using that in all of our code to reduce possible problems down 
the road.

As for easy "escape characters" to convert from ANSI to UNICODE, I asked 
this some time back and was told that there really isn't a good one-to-one 
conversion for it.

If you must play with something, the closest functions you are going to find 
are WideCharToMultiByte and MultiByteToWideChar, but they don't work all the 
time.

HTH,
~Joe 
Technical Details
Message-ID: <461b931c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <461b4e2f@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4f9f4ee974b60660
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "poojo hackma" <poojo.com/mail>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <461b4e2f@newsgroups.borland.com>
Subject: Re: Storing UNICODE in mixed string resource
Date: Tue, 10 Apr 2007 08:37:31 -0500
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-Antivirus: avast! (VPS 000731-1, 04/08/2007), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 12.191.89.68
Message-ID: <461b931c@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1176212252 12.191.89.68 (10 Apr 2007 06:37:32 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail