test for empty string in all encoding

Added additional tests so can test dummy encoding separately if required.

Also, added an empty string test.

Convert the regex to local encoding, unless it's dummy and then force UTF8