Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#3230 closed Bug (Completed)

_WideCharToMultiByte fails with double-byte codepages

Reported by: jchd18 Owned by: Jon
Milestone: Component: Standard UDFs
Version: 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 where both working and failing examples are available.

Attachments (0)

Change History (8)

comment:1 Changed 8 years ago by jchd18

  • Description modified (diff)

comment:2 Changed 8 years ago by Melba23

So this line:

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

should read:

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


comment:3 Changed 8 years ago by jchd18

Yes, that fixes the problem.

comment:4 Changed 8 years ago by Melba23

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

Fixed by revision [11700] in version:

comment:5 Changed 6 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 6 years ago by TicketCleanup

  • Milestone deleted

Automatic ticket cleanup.

comment:7 Changed 6 years ago by Jpm

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

Added by revision [11954] in version:

comment:8 Changed 6 years ago by Jon

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

Added by revision [11957] in version:

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

as closed The owner will remain Jon.

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

Note: See TracTickets for help on using tickets.