Mercurial > projects > dwt-linux
changeset 338:d47095c2d585
merge
author | John Reimer <terminal.node@gmail.com> |
---|---|
date | Thu, 23 Oct 2008 21:32:32 -0700 |
parents | 2e04c08f5e32 (current diff) 6757eb934b0b (diff) |
children | c317081df76f |
files | |
diffstat | 1 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/dwthelper/ResourceBundle.d Thu Oct 23 21:31:37 2008 -0700 +++ b/dwt/dwthelper/ResourceBundle.d Thu Oct 23 21:32:32 2008 -0700 @@ -93,20 +93,24 @@ linecontinue = false; } while( pos < line.length ){ - char c = line[pos]; + char[] c = line[pos .. pos +1]; if( esc ){ esc = false; - switch( c ){ - case 't' : c = '\t'; break; - case 'n' : c = '\n'; break; - case '\\': c = '\\'; break; - case '\"': c = '\"'; break; - //case ':' : c = ':' ; break; + switch( c[0] ){ + case 't' : c[0] = '\t'; break; + case 'n' : c[0] = '\n'; break; + case '\\': c[0] = '\\'; break; + case '\"': c[0] = '\"'; break; + case 'u' : + dchar d = Integer.parseInt( line[ pos+1 .. pos+5 ], 16 ); + c = dcharToString(d); + pos += 4; + break; default: break; } } else{ - if( c == '\\' ){ + if( c == "\\" ){ if( pos == line.length -1 ){ linecontinue = true; goto nextline; @@ -115,7 +119,7 @@ pos++; continue; } - else if( iskeypart && c == '=' ){ + else if( iskeypart && c == "=" ){ pos++; iskeypart = false; continue;