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

Side by Side Diff: runtime/bin/utils_win.h

Issue 1194883002: Improve the encoding/decoding to/from system encoding on Windows (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Addressed review comments from lrn@ Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/utils_macos.cc ('k') | runtime/bin/utils_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_UTILS_WIN_H_ 5 #ifndef BIN_UTILS_WIN_H_
6 #define BIN_UTILS_WIN_H_ 6 #define BIN_UTILS_WIN_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 namespace dart { 10 namespace dart {
11 namespace bin { 11 namespace bin {
12 12
13 void FormatMessageIntoBuffer(DWORD code, wchar_t* buffer, int buffer_length); 13 void FormatMessageIntoBuffer(DWORD code, wchar_t* buffer, int buffer_length);
14 14
15 class StringUtilsWin {
16 public:
17 static char* WideToUtf8(wchar_t* wide,
18 intptr_t len = -1,
19 intptr_t* result_len = NULL);
20 static const char* WideToUtf8(const wchar_t* wide,
21 intptr_t len = -1,
22 intptr_t* result_len = NULL);
23 static wchar_t* Utf8ToWide(char* utf8,
24 intptr_t len = -1,
25 intptr_t* result_len = NULL);
26 static const wchar_t* Utf8ToWide(const char* utf8,
27 intptr_t len = -1,
28 intptr_t* result_len = NULL);
29 };
30
15 } // namespace bin 31 } // namespace bin
16 } // namespace dart 32 } // namespace dart
17 33
18 #endif // BIN_UTILS_WIN_H_ 34 #endif // BIN_UTILS_WIN_H_
OLDNEW
« no previous file with comments | « runtime/bin/utils_macos.cc ('k') | runtime/bin/utils_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698