PHP -> hebrew -> ASP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
snooper
Forum Newbie
Posts: 2
Joined: Wed Sep 10, 2008 3:03 pm

PHP -> hebrew -> ASP

Post by snooper »

Hey folks.

I have a Vbulletin installation running, in Hebrew. the pages are all Win-1255 encoded.

I also have an ASP app, that is trying to access the Vbulletin database (mysql of course), but the data i am getting come out as question marks - '?????'

any ideas?

thanks!
dml
Forum Contributor
Posts: 133
Joined: Sat Jan 26, 2008 2:20 pm

Re: PHP -> hebrew -> ASP

Post by dml »

I suppose the first thing to check is whether the data is correctly stored in Mysql. If it is, then that isolates the problem to the ASP application. If it isn't, then the PHP application has presumably put the data in wrong, so you can either fix it at the PHP end, or hack the ASP application to correct it before processing.

Can you run charset() and hex() on a short fragment of the text that's giving you a problem, for example:

Code: Select all

 
SELECT charset(mycol), LEFT(col, 10), hex(LEFT(col,10)) FROM mytable LIMIT 1
 
snooper
Forum Newbie
Posts: 2
Joined: Wed Sep 10, 2008 3:03 pm

Re: PHP -> hebrew -> ASP

Post by snooper »

hi and sorry for the looooong delay in replying.

i tried your suggestion, using this -

Code: Select all

sql = "SELECT userid, charset(homepage), LEFT(homepage, 20), hex(LEFT(homepage,20))  FROM `user` u  ORDER BY userid LIMIT 10;"

using this response,

Code: Select all

response.Write("<BR>" & rs(0) &  "-" & rs(1) &  "-" & rs(2) &  "-" & rs(3) )
i got this:
1-utf8--
does this help at all?

thanks!
Post Reply