You really do have a problem. To use server-side code to straighten things out is going to get messy. You cannot accurately decode the character sets unless you know two pieces of information:
1) What the credit card source characterset was
2) What language the client's PC was setup for.
For example the following thought experiment:
Client scans customer's Country#1 credit card (contains ASCII characters above 127) into a Country#1 configured client PC. The characters should be correctly interpretted. The customer walks down the street to a different client which uses a different keyboard configuration and buys something. The same Country#1 credit card is scanned and interpretted differently since this client's keyboard is set to a different language (Country#2). Similarly, what if two different international credit cards are scanned into the same magstrip reader. Without the two pieces of information noted above, you cannot accurately decode the data.
Given this, you probably need to solve the problem on the client-side.
The problem occurs due to the fact that your magstrip reader is running as a keyboard wedge. It is just generating keyboard scan codes which the PC is interpretting as keystrokes. Two solutions:
1) Check if the magstrip reader can be configured for different keyboard/language setups. Most modern barcoding equipment is quite configurable. Look for an advanced reference manual at the manufacturer's website, then read it in depth. Things like this may be buried in the fine print somewhere near the configuration/setup section.
2) Use an interface box between the magstrip reader and the keyboard/PC. These boxes usually contain more intelligence (and configurability) than the barcoding/magstrip devices themselves. Have the interface box handle the language issues (see #1 above).
3) Don't connect the magstrip reader up as a keyboard wedge. Connect it to a COM port or something similiar. This will require more code mods on the client's setup for you to get the data, but circumvents the whole problem.
FYI... I am working with two different clients right now. One is doing barcode scanning (with an interface box that does magstrip readers). The other needs a language module for international character conversion. Hours of fun for the whole family. :-)
Good luck!
-- Michael
Darkstreak Computing & Innovations
www.darkstreak.com