Certain countries do not contain ASCII/EBCDIC characters. Now what?

pts.
Tags:
Application development
Alan wrote in with this question recently: "We are taking orders, via the internet, from all over the world. It has come to our attention that orders from certain countries (Turkey for example) do not contain ASCII/EBCDIC characters, so that when the order is fed into our system, they are not translatable. Is there any way (via RPG, RPG ILE, CL, API's) for a text field to be scanned/interpreted to recognize for any untranslated characters?" Any idea what Alan can do? -- Debra Tart, associate editor, Search400.com

Answer Wiki

Thanks. We'll let you know when a new response is added.

There are two general solutions to this, both involving _not_ translating before the characters get to your application. If you’re writing in Java, you’re set there, because Java tends to use Unicode. If you’re using a Windows product, change all your routines from the A (ASCII) version to the W (wide) version. If you’re in PL/1, change CHAR or CHARACTER to GRAPHIC.

If you want to do the translation yourself, go ahead and do it in your program, and in your program, you can decide how to translate the characters.

However, if you’re acting internationally, the best bet is to change the back-end to have graphics. For instance, let’s say I have this table in DB2:

CREATE TABLE example(
id INTEGER,
code CHAR(2) NOT NULL,
description VARCHAR(30) NOT NULL,
PRIMARY KEY(id));

You can change the table quite easily to handle international symbols:

CREATE TABLE example(
id INTEGER,
code GRAPHIC(2) NOT NULL,
description VARGRAPHIC(30) NOT NULL,
PRIMARY KEY(id));

You can do this using ALTER statements, without even having to move data around or create temp files.

Here’s where you want a Mac client. I can type in Unicode on my keyboard to just about any application, and certainly display unicode without having to worry about anything. I’m not sure how you do that part on the PC.

Sheldon Linker
Linker Systems, Inc.
www.linkersystems.com
sol@linker.com
800-315-1174
+1-949-552-1904

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following