Modify

Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#3230 closed Bug (Completed)

_WideCharToMultiByte fails with double-byte codepages

Reported by: jchd18 Owned by: Jon
Milestone: 3.3.14.3 Component: Standard UDFs
Version: 3.3.14.0 Severity: None
Keywords: Cc:

Description (last modified by jchd18)

The structure in _WideCharToMultiByte (WinAPI.AU3) needs to use the byte type instead of char, else the result is wrong when the user is requesting output in double-byte codepage (Korean, Japanese, and several other Asian codepages) AND the current default system codepage is also double-byte.

Follows from thread https://www.autoitscript.com/forum/topic/182255-unicode-stringtobinary-for-unsupported-language/?page=1 where both working and failing examples are available.

Attachments (0)

Change History (8)

comment:1 by jchd18, 10 years ago

Description: modified (diff)

comment:2 by Melba23, 10 years ago

So this line:

Local $tMultiByte = DllStructCreate("char[" & $aResult[0] & "]")

should read:

Local $tMultiByte = DllStructCreate("byte[" & $aResult[0] & "]")

M23

comment:3 by jchd18, 10 years ago

Yes, that fixes the problem.

comment:4 by Melba23, 10 years ago

Milestone: 3.3.15.1
Owner: set to Melba23
Resolution: Fixed
Status: newclosed

Fixed by revision [11700] in version: 3.3.15.1

comment:5 by J-Paul Mesnage, 8 years ago

Resolution: Fixed
Status: closedreopened

I reopen this ticket as the solution is now to use and extra parameter whichwill use the byte type leaving char for other cases

comment:6 by TicketCleanup, 8 years ago

Milestone: 3.3.15.1

Automatic ticket cleanup.

comment:7 by J-Paul Mesnage, 8 years ago

Milestone: 3.3.15.1
Owner: changed from Melba23 to J-Paul Mesnage
Resolution: Completed
Status: reopenedclosed

Added by revision [11954] in version: 3.3.15.1

comment:8 by Jon, 8 years ago

Milestone: 3.3.15.13.3.14.3
Owner: changed from J-Paul Mesnage to Jon

Added by revision [11957] in version: 3.3.14.3

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.