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

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

Issue 11558012: Use FormatMessageW for Windows error messages to handle internationalized messages correctly. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/process_win.cc ('k') | runtime/bin/utils_android.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_H_ 5 #ifndef BIN_UTILS_H_
6 #define BIN_UTILS_H_ 6 #define BIN_UTILS_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 DISALLOW_COPY_AND_ASSIGN(OSError); 53 DISALLOW_COPY_AND_ASSIGN(OSError);
54 }; 54 };
55 55
56 class StringUtils { 56 class StringUtils {
57 public: 57 public:
58 // The following methods convert the argument if needed. The 58 // The following methods convert the argument if needed. The
59 // conversions are only needed on Windows. If the methods returns a 59 // conversions are only needed on Windows. If the methods returns a
60 // pointer that is different from the input pointer the returned 60 // pointer that is different from the input pointer the returned
61 // pointer is allocated with malloc and should be freed using free. 61 // pointer is allocated with malloc and should be freed using free.
62 static const char* SystemStringToUtf8(const char* str); 62 static const char* ConsoleStringToUtf8(const char* str);
63 static char* SystemStringToUtf8(char* str); 63 static char* ConsoleStringToUtf8(char* str);
64 static const char* Utf8ToSystemString(const char* utf8); 64 static const char* Utf8ToConsoleString(const char* utf8);
65 static char* Utf8ToSystemString(char* utf8); 65 static char* Utf8ToConsoleString(char* utf8);
66 static char* WideToUtf8(wchar_t* wide);
67 static const char* WideToUtf8(const wchar_t* wide);
68 static wchar_t* Utf8ToWide(char* utf8);
69 static const wchar_t* Utf8ToWide(const char* utf8);
66 }; 70 };
67 71
68 #endif // BIN_UTILS_H_ 72 #endif // BIN_UTILS_H_
OLDNEW
« no previous file with comments | « runtime/bin/process_win.cc ('k') | runtime/bin/utils_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698