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

Issue 4967001: FTP: improve character encoding detection in cases where ICU's first guess is wrong. (Closed)

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

Description

FTP: improve character encoding detection in cases where ICU's first guess is wrong. Instead of using ICU's first guessed encoding immediately, we ask it for all possible encodings, try them in order, and use the first one that works. For some sites this still results in a gibberish being displayed, but at least the links are clickable so the site navigation is possible. BUG=61073 TEST=see bug Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66664

Patch Set 1 #

Total comments: 10

Patch Set 2 : fixes #

Patch Set 3 : now with tests #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+871 lines, -34 lines) Patch
M base/i18n/icu_encoding_detection.h View 2 chunks +6 lines, -0 lines 0 comments Download
M base/i18n/icu_encoding_detection.cc View 1 3 chunks +31 lines, -5 lines 3 comments Download
A net/data/ftp/dir-listing-ls-20 View 1 chunk +18 lines, -0 lines 0 comments Download
A net/data/ftp/dir-listing-ls-20.expected View 1 chunk +161 lines, -0 lines 0 comments Download
A net/data/ftp/dir-listing-ls-21 View 1 chunk +27 lines, -0 lines 0 comments Download
A net/data/ftp/dir-listing-ls-21.expected View 1 chunk +242 lines, -0 lines 0 comments Download
A net/data/ftp/dir-listing-ls-22 View 1 chunk +32 lines, -0 lines 0 comments Download
A net/data/ftp/dir-listing-ls-22.expected View 1 chunk +287 lines, -0 lines 0 comments Download
M net/ftp/ftp_directory_listing_buffer.h View 1 2 chunks +18 lines, -8 lines 0 comments Download
M net/ftp/ftp_directory_listing_buffer.cc View 1 3 chunks +46 lines, -21 lines 0 comments Download
M net/ftp/ftp_directory_listing_buffer_unittest.cc View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Paweł Hajdan Jr.
Please review: eroman/wtc: network parts jshin: i18n parts I've removed the TODO(jungshik)s, because those functions ...
10 years, 1 month ago (2010-11-13 11:14:52 UTC) #1
eroman
Any unit-tests? http://codereview.chromium.org/4967001/diff/1/base/i18n/icu_encoding_detection.cc File base/i18n/icu_encoding_detection.cc (right): http://codereview.chromium.org/4967001/diff/1/base/i18n/icu_encoding_detection.cc#newcode34 base/i18n/icu_encoding_detection.cc:34: std::vector<std::string>* encodings) { Please call: encodings->clear(); At ...
10 years, 1 month ago (2010-11-16 00:35:02 UTC) #2
Paweł Hajdan Jr.
jshin: ping! eroman: Thanks for the review. I will add a test in next patchset ...
10 years, 1 month ago (2010-11-16 21:22:38 UTC) #3
Paweł Hajdan Jr.
eroman: I think this is ready for review. I've added the tests. If you have ...
10 years, 1 month ago (2010-11-17 13:36:11 UTC) #4
cbentzel
Overall this looks fine, but I have neither ICU nor FTP expertise. http://codereview.chromium.org/4967001/diff/10001/base/i18n/icu_encoding_detection.cc File base/i18n/icu_encoding_detection.cc ...
10 years, 1 month ago (2010-11-18 16:39:43 UTC) #5
eroman
10 years, 1 month ago (2010-11-18 18:07:25 UTC) #6
lgtm

Powered by Google App Engine
This is Rietveld 408576698