Quite right, sorry, I misread the problem. Yes, regex gives up on invalid UTF-8 strings if UTF8 is set.

Henry Rich

On 5/13/2014 4:50 PM, Don Guinn wrote:
If the literal is not U8 (characters a.{~128_i.128 are regular characters),
set RX_OPTIONS_UTF8 to zero.

    RX_OPTIONS_UTF8_jregex_
1
    RX_OPTIONS_UTF8_jregex_=:0
    ('ab';'cde') rxrplc 'abcdef',254{a.
cdecdef�


On Tue, May 13, 2014 at 2:39 PM, Henry Rich <[email protected]> wrote:

The problem is not with rxrplc, but with your attempt to display byte code
254.  The issue is discussed in

www.jsoftware.com/jwiki/Vocabulary/Screen Output and Input

Henry Rich

On 5/13/2014 1:30 PM, Raul Miller wrote:

Thanks! I had noticed that any character in the last half of a. caused
the problem, but I hand not realized that 8 u: would address the
issue.

Or, in my case:
     (a. {~ 3 u: 7 u: (pat;txt) rxrplc 8 u: 4 u: 3 u: ])L:1 0 y

Thanks again,

  ----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to