Modify

Opened 17 years ago

Closed 17 years ago

#981 closed Feature Request (Completed)

_WinAPI_AnsiToOem + _WinAPI_OemToAnsi

Reported by: Zedna Owned by: J-Paul Mesnage
Milestone: 3.3.1.2 Component: Standard UDFs
Version: Severity: None
Keywords: Cc:

Description

Here is proposition for new UDF to WinApi include also with examples:

; Name...........: _WinAPI_AnsiToOem
; Description ...: Translates a string into the OEM-defined character set
; Syntax.........: _WinAPI_AnsiToOem($sText)

#cs
non english (accented) letters written to AU3 script from Scite (GUI)
must be converted to be correct in commandline output (CUI)
#ce
; Name...........: _WinAPI_OemToAnsi
; Description ...: Translates a string from the OEM-defined character set into either an ANSI or a wide-character string
; Syntax.........: _WinAPI_OemToAnsi($sText)

#cs
non english (accented) letters in output from CUI commandline tools (like PING, NET VIEW, ...)
must be converted to be correct in Windows GUI output (MsgBox)
#ce

Attachments (1)

_OemToAnsi.zip (1.5 KB ) - added by Zedna 17 years ago.

Download all attachments as: .zip

Change History (4)

by Zedna, 17 years ago

Attachment: _OemToAnsi.zip added

comment:1 by J-Paul Mesnage, 17 years ago

Those functions already exist using _WinAPI_WideCharToMultiByte() and _WinAPI_MultiByteToWideChar() with $iCodePage = 1
I am just wondering if we should add this code to
ConsoleWrite($text [, $iCodePage = 0])

comment:2 by J-Paul Mesnage, 17 years ago

I update the functions _WinAPI_WideCharToMultiByte() and _WinAPI_MultiByteToWideChar() to support "string" or struct as input and a new optional can force the return in a "string"

comment:3 by J-Paul Mesnage, 17 years ago

Milestone: 3.3.1.2
Owner: changed from Gary to J-Paul Mesnage
Resolution: Completed
Status: newclosed

Added in version: 3.3.1.2

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


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