Changeset 88
- Timestamp:
- 12/31/05 09:50:21 (3 years ago)
- Files:
-
- trunk/current/win32/import/dwt/internal/converter.d (modified) (6 diffs)
- trunk/current/win32/import/dwt/widgets/text.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/current/win32/import/dwt/internal/converter.d
r82 r88 32 32 static char[] StrToMBCS(char[] sc, uint codepage = 0) 33 33 { 34 char[] ret = sc; 34 35 try{ 35 36 foreach (char c; sc){ … … 47 48 }catch(Exception e){ 48 49 // do nothing 49 } 50 return sc; 50 ret = ""; 51 } 52 return ret; 51 53 } 52 54 … … 59 61 }catch(Exception e){ 60 62 // do nothing 63 ret = ""; 61 64 } 62 65 … … 87 90 ret = std.utf.toUTF16(sc); 88 91 }catch(Exception e){ 89 // do nothing 92 // do nothing 93 ret = ""; 90 94 } 91 95 … … 105 109 if(ws[--$] != '\0') 106 110 ws ~= '\0'; 107 }catch(Exception e){ 108 // do nothing 111 }catch(Object e){ 112 // do nothing 113 // <Shawn Liu> Win32 API raise Access violate with null pointer, so make it not null but empty 114 ws = ""; 109 115 } 110 116 return ws; … … 139 145 return WCHARzToStr(cast(wchar*)string, string.length); 140 146 } 147 141 148 static char[] WCHARzToStr(wchar* pString, int _length = -1) 142 149 { trunk/current/win32/import/dwt/widgets/text.d
r82 r88 1526 1526 TCHAR[] tc1 = Converter.StrToTCHARs(left); 1527 1527 TCHAR[] tc2 = Converter.StrToTCHARs(right); 1528 start = tc 2.length;1528 start = tc1.length; 1529 1529 end = tc2.length; 1530 1530
