2

I think about switching to DB access library that uses DSN connection - connect("mysql://login:password@database?options"). DSN uses @ as a separator. Does it mean that the password cannot contain @ symbol? Is there other restrictions?

Vitaly Lebedev
  • 113
  • 2
  • 3
  • 15

1 Answers1

7

Any special characters can be tricky with DSNs, particularly if the language / platform escaping or special character rules decide to intervene.

For Pear style DSNs, which I suppose you are using, it should be safe to use URL encoding to protect special characters (@ == %40) from being translated incorrectly.

Salieri
  • 782
  • 6
  • 17