We help IT Professionals succeed at work.
Get Started

How to convert UNICODE to ASCII

PastorDwayne
PastorDwayne asked
on
1,453 Views
Last Modified: 2013-12-14
Good-day,

I am attempting to modify an existing exe file to extract a string, and fire a MessageBox.  Everything is working fine, except the string is only displaying the first letter.

For example, instead of the Messagebox declaring "hello world", it just declares "h".

I am assuming that this is due to "hello world" being in Unicode and not ASCII (but I'm not sure though...)  The attached code is from ollydbg;

My question is, How do I get the MessageBox to display "hello world" instead of just "h"

Any help at all would be greatly appreciated;
//where EAX=0317AEBC, (UNICODE "hello world")

PUSH 0
PUSH EAX
PUSH EAX
PUSH 0
CALL USER32.MessageBoxA

Open in new window

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE