Changeset 3635

Show
Ignore:
Timestamp:
03/18/09 12:41:09 (12 months ago)
Author:
kris
Message:

Updated several of our tools to use UTF-8 when working with files on the disk now, should help fix some corruption issues with other languages

Location:
pcbsd/trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • pcbsd/trunk/CrashHandler/crashhandler.cpp

    r2107 r3635  
    2323    if ( file.open( IO_ReadOnly ) ) { 
    2424        QTextStream stream( &file ); 
     25        stream.setCodec("UTF-8"); 
    2526        QString line; 
    2627        while ( !stream.atEnd() ) { 
     
    3738    if ( file2.open( IO_ReadOnly ) ) { 
    3839        QTextStream stream( &file2 ); 
     40        stream.setCodec("UTF-8"); 
    3941        QString line; 
    4042        while ( !stream.atEnd() ) { 
  • pcbsd/trunk/CrashHandler/details.cpp

    r2107 r3635  
    4141    if ( file.open( IO_WriteOnly ) ) { 
    4242        QTextStream stream( &file ); 
     43        stream.setCodec("UTF-8"); 
    4344        stream << "Output logged from stdout\n"; 
    4445        stream << "=========================\n\n"; 
  • pcbsd/trunk/ServiceManager/servicemanager.cpp

    r2229 r3635  
    290290                 
    291291                QTextStream stream( &file ); 
     292                stream.setCodec("UTF-8"); 
    292293                QString line; 
    293294                while ( !stream.atEnd() ) { 
  • pcbsd/trunk/kcmPBSystem/cvsupprogress.cpp

    r2489 r3635  
    3535    { 
    3636       QTextStream stream(&srcFile); 
     37       stream.setCodec("UTF-8"); 
    3738       QString line; 
    3839       while (!stream.atEnd()) 
     
    7778   { 
    7879      QTextStream stream(&supRead); 
     80      stream.setCodec("UTF-8"); 
    7981      QString line; 
    8082      while (! stream.atEnd()) 
     
    102104   { 
    103105      QTextStream stream(&supWrite); 
     106      stream.setCodec("UTF-8"); 
     107 
    104108      for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) { stream << *it << "\n"; } 
    105109      supWrite.close(); 
     
    172176    { 
    173177   QTextStream stream(&supRead); 
     178   stream.setCodec("UTF-8"); 
     179 
    174180   QString line; 
    175181   while (! stream.atEnd()) 
     
    186192    { 
    187193   QTextStream stream(&supWrite); 
     194   stream.setCodec("UTF-8"); 
     195 
    188196   for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) { stream << *it << "\n"; } 
    189197   supWrite.close(); 
     
    200208    { 
    201209      QTextStream stream(&supfile); 
     210      stream.setCodec("UTF-8"); 
     211 
    202212      QString line; 
    203213      while (! stream.atEnd()) 
  • pcbsd/trunk/kcmPBSystem/fastestcvsup.cpp

    r2173 r3635  
    2424    { 
    2525        QTextStream stream(&file); 
     26        stream.setCodec("UTF-8"); 
     27 
    2628        QString line; 
    2729        bool scanning = false; 
  • pcbsd/trunk/kcmPBSystem/pbsystemtab.cpp

    r2949 r3635  
    181181    if ( file.open( IO_ReadOnly ) ) { 
    182182        QTextStream stream( &file ); 
     183        stream.setCodec("UTF-8"); 
    183184        QString line; 
    184185         
     
    339340    if ( file.open( IO_ReadOnly ) ) { 
    340341        QTextStream stream( &file ); 
     342        stream.setCodec("UTF-8"); 
    341343        QString line; 
    342344        while ( !stream.atEnd() ) { 
     
    369371    if ( fileout.open( IO_WriteOnly ) ) { 
    370372        QTextStream streamout( &fileout ); 
     373        streamout.setCodec("UTF-8"); 
    371374                    streamout << SavedFile; 
    372375        fileout.close(); 
     
    400403    if ( file.open( IO_ReadOnly ) ) { 
    401404        QTextStream stream( &file ); 
     405        stream.setCodec("UTF-8"); 
    402406        QString line; 
    403407        while ( !stream.atEnd() ) { 
  • pcbsd/trunk/kcmPBSystem/portsnapprogress.cpp

    r2949 r3635  
    2222        newsnap.open(IO_WriteOnly); 
    2323        QTextStream oldstream(&oldsnap); 
     24        oldstream.setCodec("UTF-8"); 
    2425        QTextStream newstream(&newsnap); 
     26        newstream.setCodec("UTF-8"); 
    2527        QString line; 
    2628        int i = 0; 
     
    5658    if (conf.open(IO_ReadOnly)) { 
    5759        QTextStream stream(&conf); 
     60        stream.setCodec("UTF-8"); 
     61 
    5862        QString line; 
    5963        while (!stream.atEnd()) { 
  • pcbsd/trunk/pcbsdusermanager/usermanagerback.cpp

    r2754 r3635  
    6161    if ( userFile.open(IO_ReadOnly) ) { 
    6262        QTextStream stream(&userFile); 
     63        stream.setCodec("UTF-8"); 
    6364        QString line; 
    6465         
     
    9394    if ( shellFile.open(IO_ReadOnly) ) { 
    9495        QTextStream stream(&shellFile); 
     96        stream.setCodec("UTF-8"); 
     97 
    9598        QString line; 
    9699         
     
    133136    if ( groupFile.open(IO_ReadOnly) ) { 
    134137        QTextStream stream(&groupFile); 
     138        stream.setCodec("UTF-8"); 
     139 
    135140        QString line; 
    136141