|
On Thu, 02 Nov 2006 23:46:30 -0500 "Brad Stone" <brad@xxxxxxxxxxxx> wrote: I think I just answered my own question. It appears in mixed strings of SBCS and DBCS the shift in and out DBCS delimiters X'0E' and X'0F' Not sure why I didn't see them before. Well, that makes my replace procedure much more fun. :) I assume I just have to first find these two delimiters anywhere in the string, and when scanning for replacement characters ignore anything in between these two values anywhere in the string...
Ding ding ding! Bingo. We have a winner! I am doing a replace of characters in the string before writing it. I am doing (, ) and \ since these have to be translated to \(, \) and \\ respectivley. One of the DBCS characters' bytes is x'4D' which is the same as the hex for the ( character. Now comes the fun question that I hope there is an easy answer to. When scanning a string for a character, is there a way to know if it has DBCS data in it? And if not, how would this problem be prevented? I guess I had assumed (wrongly) that DBCS data couldn't possibly be comprised of the same hex values as another SBCS characters... -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
Bradley V. Stone BVS.Tools www.bvstools.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.