Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
aecf53d0
Commit
aecf53d0
authored
Sep 21, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Use CP_UNIXCP in Unix mode.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ef5af87f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
conhost.c
programs/conhost/conhost.c
+10
-4
No files found.
programs/conhost/conhost.c
View file @
aecf53d0
...
...
@@ -233,6 +233,11 @@ static BOOL is_active( struct screen_buffer *screen_buffer )
return
screen_buffer
==
screen_buffer
->
console
->
active
;
}
static
unsigned
int
get_tty_cp
(
struct
console
*
console
)
{
return
console
->
is_unix
?
CP_UNIXCP
:
CP_UTF8
;
}
static
void
tty_flush
(
struct
console
*
console
)
{
if
(
!
console
->
tty_output
||
!
console
->
tty_buffer_count
)
return
;
...
...
@@ -406,7 +411,8 @@ static void update_output( struct screen_buffer *screen_buffer, RECT *rect )
break
;
}
size
=
WideCharToMultiByte
(
CP_UTF8
,
0
,
&
ch
->
ch
,
1
,
buf
,
sizeof
(
buf
),
NULL
,
NULL
);
size
=
WideCharToMultiByte
(
get_tty_cp
(
screen_buffer
->
console
),
0
,
&
ch
->
ch
,
1
,
buf
,
sizeof
(
buf
),
NULL
,
NULL
);
tty_write
(
screen_buffer
->
console
,
buf
,
size
);
screen_buffer
->
console
->
tty_cursor_x
++
;
}
...
...
@@ -1604,7 +1610,7 @@ static DWORD WINAPI tty_input( void *param )
signaled
=
console
->
record_count
!=
0
;
/* FIXME: Handle partial char read */
count
=
MultiByteToWideChar
(
CP_UTF8
,
0
,
read_buf
,
io
.
Information
,
buf
,
ARRAY_SIZE
(
buf
)
);
count
=
MultiByteToWideChar
(
get_tty_cp
(
console
),
0
,
read_buf
,
io
.
Information
,
buf
,
ARRAY_SIZE
(
buf
)
);
TRACE
(
"%s
\n
"
,
debugstr_wn
(
buf
,
count
)
);
...
...
@@ -2288,9 +2294,9 @@ static NTSTATUS set_console_title( struct console *console, const WCHAR *in_titl
char
*
vt
;
tty_write
(
console
,
"
\x1b
]0;"
,
4
);
len
=
WideCharToMultiByte
(
CP_UTF8
,
0
,
console
->
title
,
size
/
sizeof
(
WCHAR
),
NULL
,
0
,
NULL
,
NULL
);
len
=
WideCharToMultiByte
(
get_tty_cp
(
console
)
,
0
,
console
->
title
,
size
/
sizeof
(
WCHAR
),
NULL
,
0
,
NULL
,
NULL
);
if
((
vt
=
tty_alloc_buffer
(
console
,
len
)))
WideCharToMultiByte
(
CP_UTF8
,
0
,
console
->
title
,
size
/
sizeof
(
WCHAR
),
vt
,
len
,
NULL
,
NULL
);
WideCharToMultiByte
(
get_tty_cp
(
console
)
,
0
,
console
->
title
,
size
/
sizeof
(
WCHAR
),
vt
,
len
,
NULL
,
NULL
);
tty_write
(
console
,
"
\x07
"
,
1
);
tty_sync
(
console
);
}
...
...
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