Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Issue 6718043: FTP: Multiple fixes for localized directory listings: (Closed)

Created:
9 years, 9 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, jshin+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81081

Patch Set 1 #

Patch Set 2 : polish #

Total comments: 6

Patch Set 3 : trying to make things more clear #

Total comments: 8

Patch Set 4 : after Jungshik's comments #

Patch Set 5 : updates #

Patch Set 6 : update copyright year for the bot #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -57 lines) Patch
M base/i18n/icu_encoding_detection.h View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M base/i18n/icu_encoding_detection.cc View 1 2 3 4 3 chunks +39 lines, -1 line 0 comments Download
A net/data/ftp/dir-listing-ls-25 View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A net/data/ftp/dir-listing-ls-25.expected View 1 chunk +53 lines, -0 lines 0 comments Download
A net/data/ftp/dir-listing-ls-26 View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A net/data/ftp/dir-listing-ls-26.expected View 1 chunk +53 lines, -0 lines 0 comments Download
A net/data/ftp/dir-listing-ls-27 View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A net/data/ftp/dir-listing-ls-27.expected View 1 chunk +53 lines, -0 lines 0 comments Download
M net/ftp/ftp_directory_listing_parser.cc View 1 1 chunk +65 lines, -49 lines 0 comments Download
M net/ftp/ftp_directory_listing_parser_ls.cc View 1 1 chunk +14 lines, -0 lines 0 comments Download
M net/ftp/ftp_directory_listing_parser_ls_unittest.cc View 3 chunks +11 lines, -2 lines 0 comments Download
M net/ftp/ftp_directory_listing_parser_unittest.cc View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M net/ftp/ftp_util.cc View 1 2 3 4 5 2 chunks +8 lines, -1 line 0 comments Download
M net/ftp/ftp_util_unittest.cc View 1 2 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Paweł Hajdan Jr.
9 years, 9 months ago (2011-03-29 17:21:22 UTC) #1
Paweł Hajdan Jr.
+jshin for ICU parts
9 years, 9 months ago (2011-03-29 17:58:49 UTC) #2
Paweł Hajdan Jr.
ping
9 years, 8 months ago (2011-03-30 15:50:02 UTC) #3
gavinp
Good stuff. I just found the tests difficult to understand, so we might need some ...
9 years, 8 months ago (2011-03-30 17:14:23 UTC) #4
Paweł Hajdan Jr.
Thank you for review, please take another look. http://codereview.chromium.org/6718043/diff/2001/net/ftp/ftp_directory_listing_parser_ls_unittest.cc File net/ftp/ftp_directory_listing_parser_ls_unittest.cc (right): http://codereview.chromium.org/6718043/diff/2001/net/ftp/ftp_directory_listing_parser_ls_unittest.cc#newcode47 net/ftp/ftp_directory_listing_parser_ls_unittest.cc:47: { ...
9 years, 8 months ago (2011-04-01 15:55:27 UTC) #5
jungshik at Google
http://codereview.chromium.org/6718043/diff/11001/base/i18n/icu_encoding_detection.cc File base/i18n/icu_encoding_detection.cc (right): http://codereview.chromium.org/6718043/diff/11001/base/i18n/icu_encoding_detection.cc#newcode21 base/i18n/icu_encoding_detection.cc:21: UCharsetDetector* detector = ucsdet_open(&status); You might consider using scoped_ptr_malloc. ...
9 years, 8 months ago (2011-04-01 18:28:41 UTC) #6
Paweł Hajdan Jr.
Thank you for mentioning fixing the underlying problem in ICU. Please let me know if ...
9 years, 8 months ago (2011-04-01 18:45:42 UTC) #7
jungshik at Google
On Fri, Apr 1, 2011 at 11:45 AM, <phajdan.jr@chromium.org> wrote: > Thank you for mentioning ...
9 years, 8 months ago (2011-04-04 10:26:02 UTC) #8
Paweł Hajdan Jr.
Patch updated, please take another look.
9 years, 8 months ago (2011-04-04 18:35:22 UTC) #9
Paweł Hajdan Jr.
ping
9 years, 8 months ago (2011-04-05 17:11:21 UTC) #10
gavinp
LGTM. Nit: the date/month reversing logic is not russian specific, and a separate test for ...
9 years, 8 months ago (2011-04-05 18:55:23 UTC) #11
jungshik at Google
LGTM On Tue, Apr 5, 2011 at 11:55 AM, <gavinp@chromium.org> wrote: > LGTM. > > ...
9 years, 8 months ago (2011-04-06 06:04:37 UTC) #12
Paweł Hajdan Jr.
On 2011/04/05 18:55:23, gavinp wrote: > Nit: the date/month reversing logic is not russian specific, ...
9 years, 8 months ago (2011-04-06 06:27:09 UTC) #13
eroman
LGTM
9 years, 8 months ago (2011-04-07 01:37:10 UTC) #14
commit-bot: I haz the power
Presubmit check for 6718043-19001 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 8 months ago (2011-04-09 14:25:04 UTC) #15
commit-bot: I haz the power
9 years, 8 months ago (2011-04-09 14:52:43 UTC) #16

Powered by Google App Engine
This is Rietveld 408576698