Opened 12 years ago

Closed 12 years ago

#2268 closed Bug (Fixed)


Reported by: anonymous Owned by: guinness
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


Check _StringReverse() For Chinese, Korean, Japanese, similar characters.

Currently _StringReverse() does not work on unicode characters. If used then CPU Usage = 100%.

Previous _StringReverse() ( no dll ) one worked correctly

Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by jchd

Correct. Unless I'm wrong the function should be using wchar and _wcsrev, not char and _strrev:

Func _StringReverse($s_String)

	Local $i_len = StringLen($s_String)
	If $i_len < 1 Then Return SetError(1, 0, "")

	Local $t_chars = DllStructCreate("wchar[" & $i_len + 1 & "]")
	DllStructSetData($t_chars, 1, $s_String)

	Local $a_rev = DllCall("msvcrt.dll", "ptr:cdecl", "_wcsrev", "struct*", $t_chars)
	If @error Or $a_rev[0] = 0 Then Return SetError(2, 0, "")

	Return DllStructGetData($t_chars, 1)
EndFunc   ;==>_StringReverse

comment:2 Changed 12 years ago by guinness

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

Fixed by revision [7377] 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 guinness.

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

Note: See TracTickets for help on using tickets.