I tried to print out chr(128)-- chr(255), but the chars showed on screen are totally different from ASCII table.
Chr() only works for tose who are less than 128?
Thanks.
Yes, I send data to browser.
What do you mean server side characterset? How can I config it?
The headache thing is that when I choose some special chars from database, it will change to other chars.
Thanks.
I get your idea. My OS is WinNT, PHP is under APACHE Web server.
I don't know how to run my PHP under command line. But when I tried to run a VB program to display chr(). It gave the same wrong char as PHP did!
Any more suggestion? Thanks.
VB is tied to its OS (Win32), which has tight binding to the user's locale information. It is likely that the VB chr() function changes its output according to the locale settings of the computer on which it is invoked.
Found it. But still got some problem.
I run "php -a" on command line, then type
<?php echo "hi"; ?> , ctrl-D to end input, I got a result "hi".
But if I type <?php echo chr(251); ?>, I got a fatal error.
Any trick here? Thanks.
Sleipnir214, I submit this as a bug to PHP, and find the actual problem is : in Web server machine, we should in Microsoft SQL server -> Client network Utility -> DB-library Options, uncheck "Automatic ANSI to OEM conversion".
Thanks you for your help, now I know more about PHP
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.