|
Brad Stone wrote:
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...
A fairly easy way to handle this is to do the processing in ucs2. (At least, it's easy, if your string doesn't have more than 16383 total characters, since that's the maximum number of UCS2 characters that RPG supports.) D lparen c %ucs2('(') D rparen c %ucs2(')') D apos c %ucs2('''') D string s 16383c varying string = %ucs2(charstring); --- use all the same code as you had before --- p = %scan(lparen : string); etc charstring = %char(string);
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.