Menu

#5 regex not working under Windows XP

open
nobody
None
5
2003-01-27
2003-01-27
Tom Arn
No

The regex command does not seem to work under Windows
XP (no SP). I have written a small demo program that
runs perfectly under Windows 2000. Under XP, I get the
error message "Runtime error: Unbound symbol in
expression: r"

The problem is that the regex object r is not being
created and the subsequent call to r.replace()
therefore fails.

Here's the demo program:

do_adjust_text = func(text)
r = regex("ä")
text = r.replace(text, "ae")
r = regex("ö")
text = r.replace(text, "oe")
r = regex("ü")
text = r.replace(text, "ue")
r = regex("Ä")
text = r.replace(text, "Ae")
r = regex("Ö")
text = r.replace(text, "Oe")
r = regex("Ü")
text = r.replace(text, "Ue")
return (text)
endfunc

t="Dies sind Umlaute: äöüÄÖÜ."
message(t)
message(do_adjust_text(t))

Discussion

  • Jim

    Jim - 2003-01-27

    Logged In: YES
    user_id=406388

    Hi Tom,

    I am running XP Home Edition (no SP) and tried your sample
    program above. I saw no errors. The first message box
    outputs "Dies sind Umlaute: ." The next
    messagebox outputs "
    Dies sind Umlaute: aeoeueAeOeUe." Then the program
    gracefully ends.

    I know Andre has access to an XP machine, perhaps he can
    give it a try.

     
  • A.H. Banen

    A.H. Banen - 2003-01-28

    Logged In: YES
    user_id=423153

    Tom,
    XP *with* Service Pack diesn't have this problem...
    A workaround would be to use e.g. chr$( 228 ) for "", etc.

    B.t.w. Dialect has a problem with some extended characters
    in the editor. Just try to put in a Dialect script and you'll
    see what I mean.
    Andr

     

Log in to post a comment.