Sign in to follow this  
Followers 0
Rozek

Trouble with StringRegExp and Umlauts

5 posts in this topic

Hello!

I'm currently having problems with StringRegExp when the underlying string contains umlauts or diakrit characters: the code

local $TestString = "äöü ÄÖÜ ß Test "
  local $MatchList = StringRegExp($TestString,"Test",1)
  ConsoleWrite("Pattern found at position ",@extended-4)

It seems as if any umlaut or diakrit character counts twice :-(

Does anybody have an idea how to get rid of this problem?

Thanks in advance for any hint!

Kind regards,

Andreas Rozek

Share this post


Link to post
Share on other sites



Perhaps you're confusing StringRegExp and StringInStr. I believe this is what you're looking for:

Local $TestString = "äöü ÄÖÜ ß Test "
Local $MatchList = StringInStr($TestString,"Test",1)
ConsoleWrite("Pattern found at position " & $MatchList)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi,

True; go back maybe to v 3.2.4.9;

>Running:(3.2.4.9):C:\Program Files\AutoIt3\autoit3.exe "C:\Programs\SearchEngine\regexpshortbug.au3"

Pattern found at position 11+>07:31:13 AutoIT3.exe ended.rc:0

>Running:(3.2.7.4):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\Programs\SearchEngine\regexpshortbug.au3"

Pattern found at position 18+>07:31:29 AutoIT3.exe ended.rc:0

Best, Randall

PS - RegExp HelpFile;

Flag = 1 or 2 :

@Error Meaning

0 Array is valid. Check @Extended for next offset

Do you wish to post the bug in bug reports? Edited by randallc

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Oh no, GMK,

I don't - I just stripped down my real problem to point out what is going wrong. In my actual application, I need StringRegExp. But even if not: StringRegExp does not seem to handle Umlauts properly, does it?

Kind regards,

Andreas Rozek

Edited by Rozek

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Randall,

thanks for that hint - I'll reinstall the old version

Kind regards,

Andreas Rozek

P.S.: it's probably a good idea to post a bug report - I'll do so

P.P.S: bug report has been submitted

Edited by Rozek

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0