Click here to Skip to main content
15,313,590 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Testing if Unicode Pin
Richard MacCutchan25-Jun-10 22:12
mveRichard MacCutchan25-Jun-10 22:12 
GeneralRe: Testing if Unicode Pin
Rajesh R Subramanian25-Jun-10 23:38
professionalRajesh R Subramanian25-Jun-10 23:38 
GeneralRe: Testing if Unicode [modified] Pin
Richard MacCutchan26-Jun-10 0:05
mveRichard MacCutchan26-Jun-10 0:05 
AnswerRe: Nothing seems to work Pin
Software_Developer26-Jun-10 2:29
MemberSoftware_Developer26-Jun-10 2:29 
GeneralRe: Nothing seems to work Pin
Richard MacCutchan26-Jun-10 3:35
mveRichard MacCutchan26-Jun-10 3:35 
AnswerRe: Testing if Unicode Pin
Richard MacCutchan26-Jun-10 3:33
mveRichard MacCutchan26-Jun-10 3:33 
GeneralRe: Richards code works. Pin
Software_Developer26-Jun-10 3:57
MemberSoftware_Developer26-Jun-10 3:57 
GeneralRe: Testing if Unicode Pin
Rajesh R Subramanian26-Jun-10 8:56
professionalRajesh R Subramanian26-Jun-10 8:56 
I wish it were as simple as that. Try this:
LPCWSTR str = L"कमल"; //If you see ???, then you don't have Indic fonts installed.
BOOL b = false;
b = IsTextUnicode(str, _tcslen(str), NULL);
if(b)
	AfxMessageBox(L"Text is Unicode!");
else
	AfxMessageBox(L"Boo!");

I've worked extensively with Asian languages and I've never had this API to work reiably. I know the documentation kinda confesses it, but there has been no development on this at all!


Richard MacCutchan wrote:
char ascii[] = "The rain in Spain";

Richard MacCutchan wrote:
if (IsTextUnicode(ascii, sizeof ascii, NULL))


Also, your example is flawed because you're wrongly passing the size of the pointer instead of passing the size of the buffer itself in bytes.

Workout progress:

Current arm size: 14.4in

Desired arm size: 18in

Next Target: 15.4in by Dec 2010





Current training method: HIT

GeneralRe: Testing if Unicode Pin
Niklas L26-Jun-10 11:44
MemberNiklas L26-Jun-10 11:44 
GeneralRe: Testing if Unicode Pin
Rajesh R Subramanian27-Jun-10 3:30
professionalRajesh R Subramanian27-Jun-10 3:30 
GeneralRe: Testing if Unicode Pin
Niklas L27-Jun-10 9:28
MemberNiklas L27-Jun-10 9:28 
GeneralRe: Testing if Unicode Pin
Hans Dietrich26-Jun-10 12:17
mentorHans Dietrich26-Jun-10 12:17 
GeneralRe: Testing if Unicode Pin
Aescleal26-Jun-10 23:36
MemberAescleal26-Jun-10 23:36 
GeneralRe: Testing if Unicode Pin
Richard MacCutchan27-Jun-10 0:04
mveRichard MacCutchan27-Jun-10 0:04 
GeneralRe: Testing if Unicode Pin
Rajesh R Subramanian27-Jun-10 3:30
professionalRajesh R Subramanian27-Jun-10 3:30 
GeneralRe: Testing if Unicode Pin
Richard MacCutchan27-Jun-10 7:34
mveRichard MacCutchan27-Jun-10 7:34 
AnswerRe: Testing if Unicode Pin
Nemanja Trifunovic27-Jun-10 11:32
MemberNemanja Trifunovic27-Jun-10 11:32 
GeneralRe: Testing if Unicode Pin
VeganFanatic27-Jun-10 18:15
MemberVeganFanatic27-Jun-10 18:15 
QuestionQuestion on CMFCToolBarComboBoxButton -- MDI program. Pin
SAMZCN25-Jun-10 19:33
MemberSAMZCN25-Jun-10 19:33 
AnswerRe: Question on CMFCToolBarComboBoxButton -- MDI program. Pin
Niklas L26-Jun-10 5:25
MemberNiklas L26-Jun-10 5:25 
GeneralRe: Question on CMFCToolBarComboBoxButton -- MDI program. Pin
SAMZCN26-Jun-10 6:24
MemberSAMZCN26-Jun-10 6:24 
GeneralRe: Question on CMFCToolBarComboBoxButton -- MDI program. Pin
Niklas L26-Jun-10 7:27
MemberNiklas L26-Jun-10 7:27 
GeneralRe: Question on CMFCToolBarComboBoxButton -- MDI program. Pin
SAMZCN26-Jun-10 18:47
MemberSAMZCN26-Jun-10 18:47 
Questionhow to register dll or ocx file via c++ code Pin
b-rad31125-Jun-10 10:38
Memberb-rad31125-Jun-10 10:38 
AnswerRe: how to register dll or ocx file via c++ code Pin
Aescleal25-Jun-10 10:45
MemberAescleal25-Jun-10 10:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.