diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 09:29:54 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 09:29:54 +0000 |
commit | 82acbaaacf50d6ac2db1e810839939a278e96833 (patch) | |
tree | b9261734f168f2d5b9e8b8c3876e56465bc898a3 /net/data | |
parent | 702b14e4f040653f9580644dfb8494659f210a57 (diff) | |
download | chromium_src-82acbaaacf50d6ac2db1e810839939a278e96833.zip chromium_src-82acbaaacf50d6ac2db1e810839939a278e96833.tar.gz chromium_src-82acbaaacf50d6ac2db1e810839939a278e96833.tar.bz2 |
FTP: Multiple fixes for localized directory listings:
- fix detection of KOI8-R and possibly other encodings
- fix parsing Russian month names
When detecting the listing encoding, we need to not only
check whether the data can be converted using given encoding,
but also whether the result can be parsed as a valid directory listing.
Also, we only need to compare the first three characters of the
abbreviated month name, because that's how they're abbreviated
in FTP directory listings.
Finally, the Russian directory listings have swapped the "month" and "day of month" columns.
BUG=65917
Review URL: http://codereview.chromium.org/6718043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/data')
-rw-r--r-- | net/data/ftp/dir-listing-ls-25 | 6 | ||||
-rw-r--r-- | net/data/ftp/dir-listing-ls-25.expected | 53 | ||||
-rw-r--r-- | net/data/ftp/dir-listing-ls-26 | 6 | ||||
-rw-r--r-- | net/data/ftp/dir-listing-ls-26.expected | 53 | ||||
-rw-r--r-- | net/data/ftp/dir-listing-ls-27 | 6 | ||||
-rw-r--r-- | net/data/ftp/dir-listing-ls-27.expected | 53 |
6 files changed, 177 insertions, 0 deletions
diff --git a/net/data/ftp/dir-listing-ls-25 b/net/data/ftp/dir-listing-ls-25 new file mode 100644 index 0000000..47e0487 --- /dev/null +++ b/net/data/ftp/dir-listing-ls-25 @@ -0,0 +1,6 @@ +drwxr-xr-x 3 ftp ftp 4096 15 апр 18:11 . +drwxr-xr-x 3 ftp ftp 4096 15 июл 18:11 .. +-rw-r--r-- 1 ftp ftp 528 01 май 2007 .message +-rw-r--r-- 1 ftp ftp 528 01 ноя 2007 README +-rw-r--r-- 1 ftp ftp 560 28 сен 2007 index.html +drwxr-xr-x 33 ftp ftp 4096 12 фев 2008 pub diff --git a/net/data/ftp/dir-listing-ls-25.expected b/net/data/ftp/dir-listing-ls-25.expected new file mode 100644 index 0000000..3405f86 --- /dev/null +++ b/net/data/ftp/dir-listing-ls-25.expected @@ -0,0 +1,53 @@ +d +. +-1 +1994 +4 +15 +18 +11 + +d +.. +-1 +1994 +7 +15 +18 +11 + +- +.message +528 +2007 +5 +1 +0 +0 + +- +README +528 +2007 +11 +1 +0 +0 + +- +index.html +560 +2007 +9 +28 +0 +0 + +d +pub +-1 +2008 +2 +12 +0 +0 diff --git a/net/data/ftp/dir-listing-ls-26 b/net/data/ftp/dir-listing-ls-26 new file mode 100644 index 0000000..45d7e8a --- /dev/null +++ b/net/data/ftp/dir-listing-ls-26 @@ -0,0 +1,6 @@ +drwxr-xr-x 3 ftp ftp 4096 15 18:11 . +drwxr-xr-x 3 ftp ftp 4096 15 18:11 .. +-rw-r--r-- 1 ftp ftp 528 01 2007 .message +-rw-r--r-- 1 ftp ftp 528 01 2007 README +-rw-r--r-- 1 ftp ftp 560 28 2007 index.html +drwxr-xr-x 33 ftp ftp 4096 12 2008 pub diff --git a/net/data/ftp/dir-listing-ls-26.expected b/net/data/ftp/dir-listing-ls-26.expected new file mode 100644 index 0000000..3405f86 --- /dev/null +++ b/net/data/ftp/dir-listing-ls-26.expected @@ -0,0 +1,53 @@ +d +. +-1 +1994 +4 +15 +18 +11 + +d +.. +-1 +1994 +7 +15 +18 +11 + +- +.message +528 +2007 +5 +1 +0 +0 + +- +README +528 +2007 +11 +1 +0 +0 + +- +index.html +560 +2007 +9 +28 +0 +0 + +d +pub +-1 +2008 +2 +12 +0 +0 diff --git a/net/data/ftp/dir-listing-ls-27 b/net/data/ftp/dir-listing-ls-27 new file mode 100644 index 0000000..3c0a304 --- /dev/null +++ b/net/data/ftp/dir-listing-ls-27 @@ -0,0 +1,6 @@ +drwxr-xr-x 3 ftp ftp 4096 15 18:11 . +drwxr-xr-x 3 ftp ftp 4096 15 18:11 .. +-rw-r--r-- 1 ftp ftp 528 01 2007 .message +-rw-r--r-- 1 ftp ftp 528 01 2007 README +-rw-r--r-- 1 ftp ftp 560 28 2007 index.html +drwxr-xr-x 33 ftp ftp 4096 12 2008 pub diff --git a/net/data/ftp/dir-listing-ls-27.expected b/net/data/ftp/dir-listing-ls-27.expected new file mode 100644 index 0000000..3405f86 --- /dev/null +++ b/net/data/ftp/dir-listing-ls-27.expected @@ -0,0 +1,53 @@ +d +. +-1 +1994 +4 +15 +18 +11 + +d +.. +-1 +1994 +7 +15 +18 +11 + +- +.message +528 +2007 +5 +1 +0 +0 + +- +README +528 +2007 +11 +1 +0 +0 + +- +index.html +560 +2007 +9 +28 +0 +0 + +d +pub +-1 +2008 +2 +12 +0 +0 |