Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
99ca38e9
Commit
99ca38e9
authored
Mar 01, 2017
by
Michael Goderbauer
Committed by
GitHub
Mar 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make use of Dart's new capability to print Unicode on Windows (#8505)
parent
46f2542b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
logger.dart
packages/flutter_tools/lib/src/base/logger.dart
+6
-5
No files found.
packages/flutter_tools/lib/src/base/logger.dart
View file @
99ca38e9
...
...
@@ -116,18 +116,19 @@ class StdoutLogger extends Logger {
/// A [StdoutLogger] which replaces Unicode characters that cannot be printed to
/// the Windows console with alternative symbols.
///
/// This exists because of https://github.com/dart-lang/sdk/issues/28571.
/// By default, Windows uses either "Consolas" or "Lucida Console" as fonts to
/// render text in the console. Both fonts only have a limited character set.
/// Unicode characters, that are not available in either of the two default
/// fonts, should be replaced by this class with printable symbols. Otherwise,
/// they will show up as the unrepresentable character symbol '�'.
class
WindowsStdoutLogger
extends
StdoutLogger
{
@override
void
writeToStdOut
(
String
message
)
{
stdout
.
write
(
message
.
replaceAll
(
'✗'
,
'X'
)
.
replaceAll
(
'✓'
,
'+'
)
.
replaceAll
(
'•'
,
'*'
)
.
replaceAll
(
'✓'
,
'√'
)
);
// TODO(goderbauer): find a way to replace all other non-printable characters
// with the unrepresentable character symbol '�'
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment