Click here to Skip to main content
15,922,145 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Best library for Matrix, Vector and statistical operations?? [modified] Pin
Kiran Satish27-Jun-07 12:07
Kiran Satish27-Jun-07 12:07 
AnswerRe: Best library for Matrix, Vector and statistical operations?? Pin
Stephen Hewitt27-Jun-07 14:01
Stephen Hewitt27-Jun-07 14:01 
AnswerRe: Best library for Matrix, Vector and statistical operations?? Pin
beko27-Jun-07 19:54
beko27-Jun-07 19:54 
QuestionIs there any tools for reading a particular location of the Physical memory??? Pin
SelvaKr27-Jun-07 6:01
SelvaKr27-Jun-07 6:01 
AnswerRe: Is there any tools for reading a particular location of the Physical memory??? Pin
Cyrilix27-Jun-07 7:03
Cyrilix27-Jun-07 7:03 
Questionsmall but high quality(color depth and pixel) toolbar? [modified] Pin
Electronic7527-Jun-07 4:03
Electronic7527-Jun-07 4:03 
AnswerRe: small but high quality(color deph and pixel) toolbar? Pin
Zoltan Balazs27-Jun-07 4:17
Zoltan Balazs27-Jun-07 4:17 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Electronic7527-Jun-07 4:46
Electronic7527-Jun-07 4:46 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Mark Salsbery27-Jun-07 5:21
Mark Salsbery27-Jun-07 5:21 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Electronic7527-Jun-07 5:31
Electronic7527-Jun-07 5:31 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Zoltan Balazs27-Jun-07 5:37
Zoltan Balazs27-Jun-07 5:37 
QuestionRe: small but high quality(color deph and pixel) toolbar? Pin
Electronic7527-Jun-07 6:01
Electronic7527-Jun-07 6:01 
AnswerRe: small but high quality(color deph and pixel) toolbar? Pin
Zoltan Balazs27-Jun-07 6:18
Zoltan Balazs27-Jun-07 6:18 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
led mike27-Jun-07 6:22
led mike27-Jun-07 6:22 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Mark Salsbery27-Jun-07 6:32
Mark Salsbery27-Jun-07 6:32 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Electronic7527-Jun-07 7:28
Electronic7527-Jun-07 7:28 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Mark Salsbery27-Jun-07 7:56
Mark Salsbery27-Jun-07 7:56 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Electronic7527-Jun-07 8:17
Electronic7527-Jun-07 8:17 
GeneralRe: small but high quality(color deph and pixel) toolbar? [modified] Pin
Mark Salsbery27-Jun-07 9:52
Mark Salsbery27-Jun-07 9:52 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Electronic7527-Jun-07 10:52
Electronic7527-Jun-07 10:52 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Mark Salsbery27-Jun-07 11:20
Mark Salsbery27-Jun-07 11:20 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Electronic7527-Jun-07 12:27
Electronic7527-Jun-07 12:27 
GeneralRe: small but high quality(color deph and pixel) toolbar? Pin
Mark Salsbery27-Jun-07 12:32
Mark Salsbery27-Jun-07 12:32 
QuestionDetect Code page using IMultiLanguage2 Interface (MS VC++ (Win32)) Pin
bikas_suman8327-Jun-07 3:47
bikas_suman8327-Jun-07 3:47 
Hi all,

I have this sample data in a .txt file,

-- Ne doit pas faire
-- é
select PARC.CONTYP
, PARC.CONSTA
, count(*)
from ParcNonCede PARC
, PLAN P
and PARC.CONSTA not in ('Stock', 'Détourné')
group by CONTYP, CONSTA
;

I am saving this in UTF-8 (not necessarily using Notepad).

Now I have this sample code to detect the Codepage of a buffer as below..
void
ExamineData(String &codepage, String &buffer)
{
IMultiLanguage2 *mlang;
DetectEncodingInfo info = {0};
MIMECPINFO codepageinfo;
int length = 0, cnt = 1;
String codepagestr; // String Datatype is my class
unsigned int len =1;

if(buffer.GetString())
length = buffer.GetLength();

HRESULT hr = S_OK;
SUCCEEDED(CoInitialize(NULL)); // init COM

hr = CoCreateInstance(CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER, IID_IMultiLanguage2,(void **)&mlang);

hr = mlang->DetectInputCodepage(0,0, (wyChar *)buffer.GetString(), &length, &info, &cnt);

if(SUCCEEDED(hr))
{
hr = mlang->GetCodePageInfo(info.nCodePage, info.nLangID, &codepageinfo);
if(SUCCEEDED(hr))
codepage.SetAs(codepageinfo.wszDescription);
}

mlang->Release();
CoUninitialize();
}

Now this Function Detects the Codepage for the Buffer as "Western European (Windows)" even though it is an UTF-8. But Notepad is able to correctly detect it as UTF-8.

I am Not able to come to a conclusion whether it is a problem with the code or with the API.

Please Help me.

Thanks in Advance,
Manohar.S
AnswerRe: Detect Code page using IMultiLanguage2 Interface (MS VC++ (Win32)) Pin
bikas_suman8328-Jun-07 1:45
bikas_suman8328-Jun-07 1: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.