Identifying special characters when creating XML output

440 pts.
Tags:
iSeries
RPGLE Program
XML
XML development
XML File Creation
Hi Everyone, I'm in the process of creating xml files (using RPGLE) to send order details to our clients. One requirement is the need to replace (encode) special characters such as < > '"& No problem there, my scan can identify and replace where necessary. The problem arises with characters not native to IBM such as the Copyright sign, Registered sign, Bullet point etc. These characters have presumably been copied in by users from a web page or Word. My question is, within my scan I need to know the Hex code for all potential symbols. (x'B3' for Bullet etc) Is there a reference somewhere please? Many thanks. Neil.

Software/Hardware used:
iSeries, os 5.4 RPGLE

Answer Wiki

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

Discuss This Question: 4  Replies

 
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
  • TomLiotta
    The problem arises with characters not native to IBM... I'm not clear on how those characters are "not native to IBM". They are as 'native' as any other character. Conversion of encodings of those should be done the same way that all other characters are converted. What is the problem that you are seeing? Are you looking at a problem of keying them into a terminal emulator? Tom
    125,585 pointsBadges:
    report
  • NeilD
    Tom, As an example: © cannot be typed into RPGLE source. As these characters are incompatible to our clients AS2 XML receiver I have to convert them to the html entity. In the case of the Copyright sign © it is © What I am asking, is how can I scan for the © in my field? My question is not just limited to the one character (©) though, I need to know how to identify any incompatible character. I hope this clarifies my question. Neil.
    440 pointsBadges:
    report
  • NeilD
    Amusingly, the editor won't let me type in the html entity. © is " & # 1 6 9 " (without the spaces. Neil.
    440 pointsBadges:
    report
  • TomLiotta
    As an example: © cannot be typed into RPGLE source. Using iSeries Access for Windows, Workstation Program 5.8, I have no problem typing the copyright ("©") symbol into RPGLE source through SEU. It's the <Alt-2> key. Of course, I did go into Edit-> Preferences-> Keyboard... and map that character to the <Alt-2> key first! However, that's not absolutely necessary. You can enable "Hex Mode" and type the hex-value for any valid character. For example, with hex-mode enabled, you type {B3} and your bullet-character is input to your session. I have modified my popup-keypad and replaced the TestReq function with HexMode. The actual problem for most of those characters is that keyboards rarely have enough actual keys to present all possible characters to users. Especially with the rise of internationalization, there are simply too many possible characters. What I use in most situations is the Windows 'Character Map' Accessory. Although I have my keyboard-map and popup-keypad customized at my office, they're not as portable as I'd like. But the 'Character Map' almost always let's me copy/paste the characters that I need. See if one of those three options is helpful. If not, there is at least one more semi-dumb thing that I do as a kind of last-gasp option. Tom
    125,585 pointsBadges:
    report

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