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

Issue 1194883002: Improve the encoding/decoding to/from system encoding on Windows (Closed)

Created:
5 years, 6 months ago by Søren Gjesse
Modified:
5 years, 6 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Improve the encoding/decoding to/from system encoding on Windows On Windows the dart:io SYSTEM_ENCODING is now also working with strings which have null characters in them. Previously the string would be terminated at the null character. BUG=https://github.com/dart-lang/sdk/issues/23295 R=kustermann@google.com, lrn@google.com Committed: https://github.com/dart-lang/sdk/commit/0415d9271d50ffd61e5243c391a02678f271bce1

Patch Set 1 #

Patch Set 2 : Port to Linux, Mac and Android #

Patch Set 3 : A few more comments #

Total comments: 44

Patch Set 4 : Refactored #

Patch Set 5 : Additional Windows fixes #

Patch Set 6 : Additional Windows fix and test fix #

Patch Set 7 : Additional documentation #

Total comments: 4

Patch Set 8 : Addressed review comments from kustermann@ #

Total comments: 12

Patch Set 9 : Addressed review comments from lrn@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+311 lines, -207 lines) Patch
M runtime/bin/directory_win.cc View 1 2 3 9 chunks +11 lines, -10 lines 0 comments Download
M runtime/bin/extensions_win.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M runtime/bin/file_system_watcher_win.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M runtime/bin/file_win.cc View 1 2 3 19 chunks +23 lines, -22 lines 0 comments Download
M runtime/bin/main.cc View 1 2 3 2 chunks +1 line, -19 lines 0 comments Download
M runtime/bin/platform_win.cc View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M runtime/bin/process.cc View 1 2 3 4 5 6 7 1 chunk +38 lines, -14 lines 0 comments Download
M runtime/bin/process_win.cc View 1 2 3 4 chunks +6 lines, -5 lines 0 comments Download
M runtime/bin/socket_win.cc View 1 2 3 3 chunks +4 lines, -2 lines 0 comments Download
M runtime/bin/utils.h View 1 2 3 4 5 1 chunk +29 lines, -14 lines 0 comments Download
M runtime/bin/utils_android.cc View 1 2 3 1 chunk +10 lines, -25 lines 0 comments Download
M runtime/bin/utils_linux.cc View 1 2 3 1 chunk +10 lines, -25 lines 0 comments Download
M runtime/bin/utils_macos.cc View 1 2 3 1 chunk +10 lines, -25 lines 0 comments Download
M runtime/bin/utils_win.h View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/bin/utils_win.cc View 1 2 3 4 5 6 7 3 chunks +86 lines, -42 lines 0 comments Download
M sdk/lib/io/string_transformer.dart View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
A tests/standalone/io/system_encoding_test.dart View 1 2 3 4 5 6 7 8 1 chunk +54 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (1 generated)
Søren Gjesse
5 years, 6 months ago (2015-06-19 13:27:52 UTC) #1
Ivan Posva
DBC -ip https://codereview.chromium.org/1194883002/diff/40001/runtime/bin/process.cc File runtime/bin/process.cc (right): https://codereview.chromium.org/1194883002/diff/40001/runtime/bin/process.cc#newcode309 runtime/bin/process.cc:309: // On some platforms StringUtils::Utf8ToConsoleString is a ...
5 years, 6 months ago (2015-06-22 08:54:17 UTC) #3
kustermann
The additional 0-termination of the strings (which in return can also contain 0 characters) seems ...
5 years, 6 months ago (2015-06-22 11:11:22 UTC) #4
Lasse Reichstein Nielsen
Please update the documentation on SYSTEM_ENCODING in string_transformer.dart. It needs to say what a "system ...
5 years, 6 months ago (2015-06-22 12:08:35 UTC) #5
Søren Gjesse
Thanks for the review. I have refactored the code to move more Windows specific functions ...
5 years, 6 months ago (2015-06-23 11:18:00 UTC) #6
kustermann
lgtm - but let the others also take a look https://codereview.chromium.org/1194883002/diff/120001/runtime/bin/process.cc File runtime/bin/process.cc (right): https://codereview.chromium.org/1194883002/diff/120001/runtime/bin/process.cc#newcode312 ...
5 years, 6 months ago (2015-06-23 12:03:58 UTC) #7
Søren Gjesse
https://codereview.chromium.org/1194883002/diff/120001/runtime/bin/process.cc File runtime/bin/process.cc (right): https://codereview.chromium.org/1194883002/diff/120001/runtime/bin/process.cc#newcode312 runtime/bin/process.cc:312: if (Dart_IsError(result))Dart_PropagateError(result); On 2015/06/23 12:03:58, kustermann wrote: > space ...
5 years, 6 months ago (2015-06-23 12:13:36 UTC) #8
Lasse Reichstein Nielsen
lgtm https://codereview.chromium.org/1194883002/diff/140001/runtime/bin/file_win.cc File runtime/bin/file_win.cc (right): https://codereview.chromium.org/1194883002/diff/140001/runtime/bin/file_win.cc#newcode577 runtime/bin/file_win.cc:577: free(const_cast<wchar_t*>(system_name)); Could it be useful to add a ...
5 years, 6 months ago (2015-06-23 13:08:51 UTC) #9
Søren Gjesse
https://codereview.chromium.org/1194883002/diff/140001/runtime/bin/file_win.cc File runtime/bin/file_win.cc (right): https://codereview.chromium.org/1194883002/diff/140001/runtime/bin/file_win.cc#newcode577 runtime/bin/file_win.cc:577: free(const_cast<wchar_t*>(system_name)); On 2015/06/23 13:08:50, Lasse Reichstein Nielsen wrote: > ...
5 years, 6 months ago (2015-06-24 07:58:26 UTC) #10
Søren Gjesse
5 years, 6 months ago (2015-06-24 08:36:17 UTC) #11
Message was sent while issue was closed.
Committed patchset #9 (id:160001) manually as
0415d9271d50ffd61e5243c391a02678f271bce1.

Powered by Google App Engine
This is Rietveld 408576698