Modify

Opened 9 years ago

Closed 7 years ago

Last modified 7 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 Changed 9 years ago by jchd18

  • Description modified (diff)

comment:2 Changed 9 years ago by Melba23

So this line:

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

should read:

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

M23

comment:3 Changed 9 years ago by jchd18

Yes, that fixes the problem.

comment:4 Changed 9 years ago by Melba23

  • Milestone set to 3.3.15.1
  • Owner set to Melba23
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [11700] in version: 3.3.15.1

comment:5 Changed 7 years ago by Jpm

  • Resolution Fixed deleted
  • Status changed from closed to reopened

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 Changed 7 years ago by TicketCleanup

  • Milestone 3.3.15.1 deleted

Automatic ticket cleanup.

comment:7 Changed 7 years ago by Jpm

  • Milestone set to 3.3.15.1
  • Owner changed from Melba23 to Jpm
  • Resolution set to Completed
  • Status changed from reopened to closed

Added by revision [11954] in version: 3.3.15.1

comment:8 Changed 7 years ago by Jon

  • Milestone changed from 3.3.15.1 to 3.3.14.3
  • Owner changed from Jpm to Jon

Added by revision [11957] in version: 3.3.14.3

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.