Click here to Skip to main content
15,919,778 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Using microsoft STL and STLport in same project Pin
Stuart Dootson1-Jul-09 5:37
professionalStuart Dootson1-Jul-09 5:37 
GeneralRe: Using microsoft STL and STLport in same project Pin
Vishal Kumar Soni1-Jul-09 6:02
Vishal Kumar Soni1-Jul-09 6:02 
GeneralRe: Using microsoft STL and STLport in same project Pin
AVIJIT NANDI7-Feb-10 19:53
AVIJIT NANDI7-Feb-10 19:53 
QuestionRe: Using microsoft STL and STLport in same project Pin
AVIJIT NANDI7-Feb-10 20:04
AVIJIT NANDI7-Feb-10 20:04 
AnswerRe: Using microsoft STL and STLport in same project Pin
Vishal Kumar Soni9-Feb-10 17:46
Vishal Kumar Soni9-Feb-10 17:46 
GeneralRe: Using microsoft STL and STLport in same project Pin
AVIJIT NANDI9-Feb-10 18:45
AVIJIT NANDI9-Feb-10 18:45 
GeneralRe: Using microsoft STL and STLport in same project Pin
sbansal714-Sep-11 14:38
sbansal714-Sep-11 14:38 
QuestionMy codecvt (a.k.a. facet) never gets called. Pin
John R. Shaw27-Jun-09 9:35
John R. Shaw27-Jun-09 9:35 
I have been at this all night and I am still no closer to a solution.Confused | :confused:

The problem is that utf16_codecvt methods never get called and, therefore, the result is wrong. I have search the net, but all I can find is examples of what is supposed to work. Unfortunately none of them has worked. I have also seen other posters, on the net, with the same problem, but no one gave them and answer to it.

I have tested to make sure that it has the facet (utf16_codecvt) and it does. So I see no reason why its virtual methods are never called. Instead it keeps calling the codecvt<wchar_t,char, mbstate> methods.

Any ideas?
class utf16_codecvt : public std::codecvt<char16_t, char16_t, std::mbstate_t>
{
    ...//
};

void MyTestFunc()
{
    ... //
    std::wifstream myFile;
    std::locale myLoc = std::locale(myFile.getloc(), new utf16_codecvt);
    myFile.imbue(myLoc);
    myFile.open(pFileName, std::ios::in | std::ios::binary);
    ... //
    myFile.read(bom_buffer, 1);
    ... //
}

The following link gives an example of the types of things I am trying to do.

April 01, 1999 - Unicode Files - P.J. Plauger http://www.ddj.com/cpp/184403638?pgno=1[^]

Signed, Very <blanking> tired. Sleepy | :zzz:

INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

AnswerRe: My codecvt (a.k.a. facet) never gets called. Pin
Stuart Dootson28-Jun-09 23:37
professionalStuart Dootson28-Jun-09 23:37 
GeneralRe: My codecvt (a.k.a. facet) never gets called. Pin
John R. Shaw29-Jun-09 2:43
John R. Shaw29-Jun-09 2:43 
GeneralRe: My codecvt (a.k.a. facet) never gets called. Pin
Stuart Dootson29-Jun-09 3:16
professionalStuart Dootson29-Jun-09 3:16 
QuestionPossible to have a two-way Associative Arrays Pin
ComplexLifeForm25-Jun-09 2:30
ComplexLifeForm25-Jun-09 2:30 
AnswerRe: Possible to have a two-way Associative Arrays Pin
Andy Moore25-Jun-09 6:09
Andy Moore25-Jun-09 6:09 
GeneralRe: Possible to have a two-way Associative Arrays Pin
Stuart Dootson25-Jun-09 6:10
professionalStuart Dootson25-Jun-09 6:10 
AnswerRe: Possible to have a two-way Associative Arrays Pin
Stuart Dootson25-Jun-09 6:09
professionalStuart Dootson25-Jun-09 6:09 
GeneralRe: Possible to have a two-way Associative Arrays Pin
Kevin McFarlane4-Jul-09 6:01
Kevin McFarlane4-Jul-09 6:01 
GeneralRe: Possible to have a two-way Associative Arrays Pin
Stuart Dootson4-Jul-09 7:49
professionalStuart Dootson4-Jul-09 7:49 
AnswerRe: Possible to have a two-way Associative Arrays Pin
ComplexLifeForm25-Jun-09 7:01
ComplexLifeForm25-Jun-09 7:01 
QuestionHow to Implement RPC in windows XP Pin
suthakar5618-Jun-09 18:45
suthakar5618-Jun-09 18:45 
AnswerRe: How to Implement RPC in windows XP Pin
Stuart Dootson18-Jun-09 22:05
professionalStuart Dootson18-Jun-09 22:05 
AnswerRe: How to Implement RPC in windows XP Pin
led mike19-Jun-09 5:25
led mike19-Jun-09 5:25 
GeneralRe: How to Implement RPC in windows XP Pin
suthakar5619-Jun-09 5:38
suthakar5619-Jun-09 5:38 
GeneralRe: How to Implement RPC in windows XP Pin
led mike19-Jun-09 5:53
led mike19-Jun-09 5:53 
GeneralRe: How to Implement RPC in windows XP Pin
Stuart Dootson19-Jun-09 12:46
professionalStuart Dootson19-Jun-09 12:46 
GeneralRe: How to Implement RPC in windows XP Pin
suthakar5619-Jun-09 22:30
suthakar5619-Jun-09 22:30 

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.