rtoss

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/GreenPad-nt31/ @ 120  →  /GreenPad-nt31/ @ 121
/GreenPad-nt31/kilib/textfile.cpp
@@ -396,7 +396,7 @@
, fe( reinterpret_cast<const char*>(b+s) )
, cp( c==UTF8 ? UTF8N : c )
//, next( cp==UTF8N ? CharNextUtf8 : CharNextExA )
, conv( cp==UTF8N && app().isWin95()
, conv( cp==UTF8N && (app().isWin95()||!app().isNewShell())
? Utf8ToWideChar : MultiByteToWideChar )
{
if( cp==UTF8N && fe-fb>=3
@@ -427,10 +427,18 @@
}
 
// Unicode‚Ö•ÏŠ·
ulong len;
#ifndef _UNICODE
ulong len = conv( cp, 0, fb, p-fb, buf, siz );
len = conv( cp, 0, fb, p-fb, buf, siz );
#else
ulong len = ::MultiByteToWideChar( cp, 0, fb, int(p-fb), buf, siz );
if(!app().isNewShell())
{
len = conv( cp, 0, fb, p-fb, buf, siz );
}
else
{
len = ::MultiByteToWideChar( cp, 0, fb, int(p-fb), buf, siz );
}
#endif
// ‰üsƒR[ƒhƒXƒLƒbƒvˆ—
if( state == EOL )
@@ -1104,7 +1112,7 @@
//-------------------------------------------------------------------------
// Win95‘΍ô‚ÌŽ©‘OUTF8/UTF7ˆ—
//-------------------------------------------------------------------------
#ifndef _UNICODE
//#ifndef _UNICODE
 
struct wUTF8 : public TextFileWPimpl
{
@@ -1222,7 +1230,7 @@
 
 
 
#endif
//#endif
//-------------------------------------------------------------------------
// Windows—Š‚è‚Ì•ÏŠ·
//-------------------------------------------------------------------------
@@ -1564,11 +1572,17 @@
case UTF8N:
default:
#ifndef _UNICODE
if( app().isWin95() && (cs_==UTF8 || cs_==UTF8N) )
if( /*app().isWin95() &&*/ (cs_==UTF8 || cs_==UTF8N) )
impl_ = new wUTF8( fp_, cs_ );
else if( app().isWin95() && cs_==UTF7 )
else if( /*app().isWin95() &&*/ cs_==UTF7 )
impl_ = new wUTF7( fp_ );
else
#else
if( !app().isNewShell() && (cs_==UTF8 || cs_==UTF8N) )
impl_ = new wUTF8( fp_, cs_ );
else if( !app().isNewShell() && cs_==UTF7 )
impl_ = new wUTF7( fp_ );
else
#endif
impl_ = new wMBCS( fp_, cs_ );
break;