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
0df37dd9
Commit
0df37dd9
authored
Jan 15, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use the proper codepage for console functions.
Based on a patch by Anatoly Lyutin.
parent
7ba9ee9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
console.c
dlls/kernel32/console.c
+4
-4
No files found.
dlls/kernel32/console.c
View file @
0df37dd9
...
...
@@ -1200,7 +1200,7 @@ BOOL WINAPI ReadConsoleA(HANDLE hConsoleInput, LPVOID lpBuffer, DWORD nNumberOfC
BOOL
ret
;
if
((
ret
=
ReadConsoleW
(
hConsoleInput
,
ptr
,
nNumberOfCharsToRead
,
&
ncr
,
NULL
)))
ncr
=
WideCharToMultiByte
(
CP_ACP
,
0
,
ptr
,
ncr
,
lpBuffer
,
nNumberOfCharsToRead
,
NULL
,
NULL
);
ncr
=
WideCharToMultiByte
(
GetConsoleCP
()
,
0
,
ptr
,
ncr
,
lpBuffer
,
nNumberOfCharsToRead
,
NULL
,
NULL
);
if
(
lpNumberOfCharsRead
)
*
lpNumberOfCharsRead
=
ncr
;
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
...
...
@@ -2005,13 +2005,13 @@ BOOL WINAPI WriteConsoleA(HANDLE hConsoleOutput, LPCVOID lpBuffer, DWORD nNumber
LPWSTR
xstring
;
DWORD
n
;
n
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpBuffer
,
nNumberOfCharsToWrite
,
NULL
,
0
);
n
=
MultiByteToWideChar
(
GetConsoleOutputCP
()
,
0
,
lpBuffer
,
nNumberOfCharsToWrite
,
NULL
,
0
);
if
(
lpNumberOfCharsWritten
)
*
lpNumberOfCharsWritten
=
0
;
xstring
=
HeapAlloc
(
GetProcessHeap
(),
0
,
n
*
sizeof
(
WCHAR
));
if
(
!
xstring
)
return
0
;
MultiByteToWideChar
(
CP_ACP
,
0
,
lpBuffer
,
nNumberOfCharsToWrite
,
xstring
,
n
);
MultiByteToWideChar
(
GetConsoleOutputCP
()
,
0
,
lpBuffer
,
nNumberOfCharsToWrite
,
xstring
,
n
);
ret
=
WriteConsoleW
(
hConsoleOutput
,
xstring
,
n
,
lpNumberOfCharsWritten
,
0
);
...
...
@@ -2258,7 +2258,7 @@ BOOL WINAPI ScrollConsoleScreenBufferA(HANDLE hConsoleOutput, LPSMALL_RECT lpScr
CHAR_INFO
ciw
;
ciw
.
Attributes
=
lpFill
->
Attributes
;
MultiByteToWideChar
(
CP_ACP
,
0
,
&
lpFill
->
Char
.
AsciiChar
,
1
,
&
ciw
.
Char
.
UnicodeChar
,
1
);
MultiByteToWideChar
(
GetConsoleOutputCP
()
,
0
,
&
lpFill
->
Char
.
AsciiChar
,
1
,
&
ciw
.
Char
.
UnicodeChar
,
1
);
return
ScrollConsoleScreenBufferW
(
hConsoleOutput
,
lpScrollRect
,
lpClipRect
,
dwDestOrigin
,
&
ciw
);
...
...
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