Changeset 12000


Ignore:
Timestamp:
07/25/10 15:41:37 (19 months ago)
Author:
chorny
Message:

convert path back from utf8 on win32 (fix for #781)

Location:
trunk/Padre
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/Changes

    r11996 r12000  
    6969    - Padre has wxWidgets method documentation in F2 help search (AZAWAWI) 
    7070    - Added Padre::Wx::Nth to group first/nth-time startup magic (ADAMK) 
     71    - Fixed #781 : Unicode should not be used for accessing file system on Win32 (CHORNY) 
    7172 
    72730.66 2010.07.01 
  • trunk/Padre/lib/Padre/Config.pm

    r11959 r12000  
    229229        Carp::croak("Tried to change setting '$name' to non-integer '$value'"); 
    230230    } 
    231     if ( $type == Padre::Constant::PATH and not -e $value ) { 
    232         Carp::croak("Tried to change setting '$name' to non-existant path '$value'"); 
     231    if ( $type == Padre::Constant::PATH ) { 
     232        if (Padre::Constant::WIN32 and utf8::is_utf8($value)) { 
     233            require Win32; 
     234            $value=Win32::GetLongPathName($value); 
     235            #Wx::DirPickerCtrl upgrades data to utf8. 
     236            #Perl on Windows cannot handle utf8 in file names, so this hack converts 
     237            #path back 
     238        } 
     239        if (not -e $value) { 
     240            Carp::croak("Tried to change setting '$name' to non-existant path '$value'"); 
     241        } 
    233242    } 
    234243 
Note: See TracChangeset for help on using the changeset viewer.