On 3/7/06, Mike Heins <suppressed> wrote:> Quoting Elver Loho (suppressed):> > What I need documentation on is how to tell Interchange to send 'set> > names utf8' (or the other string) to MySQL before selecting anything> > from there.>> Documentation doesn't exist because the capability does not exist. It> would be ridiculous to require a pre-query for every query to a database,> which is why this hasn't come up in 8 years of Interchange supporting> SQL databases. Aye, this is something new. From an idealistic point of view, it makesmore sense than the old system. > If they really did require a pre-query to return the proper data, it> sounds like MySQL has changed the rules in a big way. I would be extremely> surprised if this was really required. Allow me to demonstrate. Fresh connection via the command line mysql client: (rus field is defined with 'text character set utf8' and text wasentered from a custom-made program as an utf8 string after setting'set name utf8'. it refused to work correctly without that command.) mysql> select rus from locale where id=288;+-----------------------+| rus |+-----------------------+| ?? ?? ????????? ????. |+-----------------------+1 row in set (0.00 sec) mysql> set names utf8;Query OK, 0 rows affected (0.00 sec) mysql> select rus from locale where id=288;+----------------------------------------+| rus |+----------------------------------------+| ит ис сометхинг елсе. |+----------------------------------------+1 row in set (0.00 sec) > There must be a way to prevent it from munging this data without having> to have a pre-query every time. Have you looked at DBI and MySQL> documentation about this? I can't say I have, but I think there is a way. It involves querieswith casting/conversion. http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html Example after 'set names latin1': mysql> select convert(rus using binary) from locale where id=288;+----------------------------------------+| convert(rus using binary) |+----------------------------------------+| ит ис сометхинг елсе. |+----------------------------------------+1 row in set (0.00 sec) Could you possibly point me towards DBI documentation regarding this? Elver _______________________________________________ interchange-users mailing list suppressed http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.