Jump to content

ChrisFredriksson

New Members
  • Posts

    3
  • Joined

  • Last visited

ChrisFredriksson's Achievements

Newbie

Newbie (1/5)

0

Reputation

1

Community Answers

  1. Hi requinix, Thanks for the quick reply! I do believe it must be using UTF-8.. But I think I've finally figured it out, before I saw your reply.. The $variable gets the data from a GET var and I preprocess this to make sure nothing illegal is there, it seems that I'm a bit too aggresive and filtering even valid characters 😂 When I tried just a regular $_GET it worked perfectly.. so at least I know where the problem is now. Thanks however! I really appreciate the quick reply and I'm try and figure this out. If, or hopefully when, I find out the culprit I'll post here.
  2. Hey everyone, I've been having troubles previously, some months to some year ago, with preg_match'ing on Swedish characters ÅÄÖ. I had no luck whatsoever after a few hours of trying different variations and today I wanted to revisit this as it is still a problem. But I just can't figure out why it doesn't work, so I'm hoping you guys can help me out! I have this preg_match; preg_match('/^[a-z A-Z\Å\å\Ä\ä\Ö\ö\s*\d]+$/u', $variable) and as soon as I have any ÅÄÖ in the variable, it just doesn't want to match on it. Could you please help me out before I throw the computer out the window? 😥😥😥 What I want is to only allow a-z A-Z and the Swedish characters ÅÄÖåäö - it is a match for first/lastname of a person.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.