Click here to Skip to main content
15,896,201 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: DRMInitEnvironment function fails............... :( Pin
Jordan_Tao9-Jul-13 21:40
Jordan_Tao9-Jul-13 21:40 
QuestionMsiInstallProduct() function not working in Win2008 server SP1(64 bit) Pin
birajendu1-Jun-09 20:49
birajendu1-Jun-09 20:49 
QuestionHow to get minimize all dialog with main windiw? Pin
002comp1-Jun-09 20:20
002comp1-Jun-09 20:20 
AnswerRe: How to get minimize all dialog with main windiw? Pin
Naveen1-Jun-09 20:32
Naveen1-Jun-09 20:32 
GeneralRe: How to get minimize all dialog with main windiw? Pin
002comp1-Jun-09 22:17
002comp1-Jun-09 22:17 
GeneralRe: How to get minimize all dialog with main windiw? Pin
Naveen1-Jun-09 22:18
Naveen1-Jun-09 22:18 
GeneralRe: How to get minimize all dialog with main windiw? Pin
002comp1-Jun-09 22:30
002comp1-Jun-09 22:30 
QuestionUnicode 5.1 ( Basic Multilingual Plane ) - Language Identification related problem Pin
PankajB1-Jun-09 19:49
PankajB1-Jun-09 19:49 
Hi There.

I am creating an application that will take a document as an input and will find Total Number of languages used to compose the same.

I am refering below web link to do the same...

http://en.wikipedia.org/wiki/Basic_Multilingual_Plane[^]

Let me also share some code snippet with you guys...

FILE *fp;
long unicode;
long c;

fp = fopen(argv[1], "r");
if(!fp)
{
	printf("File open failed\n");
	return 0;
}

printf("Input Unicode file: %s\n", argv[1]);
c = fgetc(fp);
c = fgetc(fp);

while( (unicode = fgetc(fp)) != EOF)
{
	long unicode1 = fgetc(fp);
	unicode = (unicode1 << 8) | unicode;
         //(0000–FFFF): Basic Multilingual Plane (BMP).
	if (unicode >= 0x0000 /*0*/ && unicode <= 0x07FF/*2047*/) 
	{
		if (unicode >= 0x0000 && unicode <= 0x007F) //Basic Latin (0000–007F) 
		{ 
			unicode_set[Basic_Latin] = 1; 
		}
                .... 
                .... 
                .... 
        }
}
fclose(fp);


I got this code from one of my previous projects. But I am not able to understand why are we doing
unicode = (unicode1 << 8) | unicode;

Also, this method is not able to correctly identify all the chars.

Just FYI, I am using VS.NET 2008 with "Charset settings" as "Use Unicode Character Set"

Please suggest, if you have any other way to find out, like what all languages we have used to compose a document?

Thanks
PanB
AnswerRe: Unicode 5.1 ( Basic Multilingual Plane ) - Language Identification related problem Pin
Stuart Dootson2-Jun-09 0:19
professionalStuart Dootson2-Jun-09 0:19 
GeneralRe: Unicode 5.1 ( Basic Multilingual Plane ) - Language Identification related problem Pin
PankajB2-Jun-09 0:58
PankajB2-Jun-09 0:58 
GeneralRe: Unicode 5.1 ( Basic Multilingual Plane ) - Language Identification related problem Pin
Stuart Dootson2-Jun-09 1:11
professionalStuart Dootson2-Jun-09 1:11 
QuestionCopyFile Pin
p_19601-Jun-09 19:49
p_19601-Jun-09 19:49 
AnswerRe: CopyFile Pin
Stephen Hewitt1-Jun-09 20:03
Stephen Hewitt1-Jun-09 20:03 
QuestionOutlook .pst file Pin
Pardhu_M1-Jun-09 19:36
Pardhu_M1-Jun-09 19:36 
AnswerRe: Outlook .pst file Pin
Stuart Dootson2-Jun-09 0:39
professionalStuart Dootson2-Jun-09 0:39 
QuestionReading strings containing escape sequence. Pin
Comp_Users1-Jun-09 19:24
Comp_Users1-Jun-09 19:24 
AnswerRe: Reading strings containing escape sequence. Pin
Cedric Moonen1-Jun-09 20:26
Cedric Moonen1-Jun-09 20:26 
QuestionIntegrated Windows Authentication or NTLM How ? Pin
ERLN1-Jun-09 19:09
ERLN1-Jun-09 19:09 
Questionchange mouse pointer for MainFram and dialog in MDI applicaion Pin
ptr_Electron1-Jun-09 19:04
ptr_Electron1-Jun-09 19:04 
AnswerRe: change mouse pointer for MainFram and dialog in MDI applicaion Pin
Chandrasekharan P1-Jun-09 19:50
Chandrasekharan P1-Jun-09 19:50 
GeneralRe: change mouse pointer for MainFram and dialog in MDI applicaion [modified] Pin
ptr_Electron1-Jun-09 20:08
ptr_Electron1-Jun-09 20:08 
GeneralRe: change mouse pointer for MainFram and dialog in MDI applicaion Pin
Chandrasekharan P1-Jun-09 20:20
Chandrasekharan P1-Jun-09 20:20 
GeneralRe: change mouse pointer for MainFram and dialog in MDI applicaion Pin
ptr_Electron2-Jun-09 21:17
ptr_Electron2-Jun-09 21:17 
GeneralRe: change mouse pointer for MainFram and dialog in MDI applicaion Pin
Chandrasekharan P2-Jun-09 22:04
Chandrasekharan P2-Jun-09 22:04 
GeneralRe: change mouse pointer for MainFram and dialog in MDI applicaion Pin
ptr_Electron2-Jun-09 22:23
ptr_Electron2-Jun-09 22:23 

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.