[Dbix-class] Character set help
Frank Speiser
frank at takkle.com
Tue Jul 31 21:21:26 GMT 2007
Matt S Trout wrote:
> On Mon, Jul 30, 2007 at 02:52:09PM -0700, Michael Higgins wrote:
>
> But with DBIx::Class, a '?' is coming across, killing the app.
>
> Where do I try to find the problem? First, I determined issue is not with Freetds. Must be in DBIC? How do I tweak the setting to get the right encoded data?
>
> C'mon dude, so far your question is only one step removed from "how long is
> a piece of string", help us out here :)
>
ummm:
length($string);
As far as FreeTDS, whew. Good luck there.
My guess is there is something not coming out of freetds, and then
you're going somewhere with it, but you don't have
First step is to make sure what you have is what you really expect you
have. Then start looking at DBIC.
My experience so far is that when I think it's DBIC, it's _usually_ not
the problem. But, there are a few bugs in there. Ask Matt, we do all
sorts of new and occasionally stupid things with DBIC here ;)
You can pervert this type of thing to see what's there:
my $columns = $freetds_dbh->selectall_hashref("EXEC sp_columns
$table", 'COLUMN_NAME');
foreach my $column (sort { $columns->{$a}{ORDINAL_POSITION} <=>
$columns->{$b}{ORDINAL_POSITION} } keys %{$columns}) {
print "$columns->{$column}{COLUMN_NAME}";
}
Do some looking around. Are all the columns there?
If you don't see what you expect in terms of columns to access the
column's value at some later point, then the problem might be in DBIC.
If all looks well --
Then print the column value.
Then try doing translating it into hex to see if it matches what you expect.
Also, as much as everyone will fire up the bitch-o-tron for me posting
this, check here:
http://msdn2.microsoft.com/en-us/library/ms176077.aspx
Also worth considering: MSSQL is probably possessed by demons.
----
P.S. Fire when ready, ye' bastards.
--
Frank Speiser
CTO
TAKKLE, Inc.
212.792.5854 (work)
212.792.5859 (fax)
frank at takkle.com
More information about the Dbix-class
mailing list