How do I go about when retrieving data from Mysql (4.1.12) from tables which have charset=utf8. Some of the columns have latin characters, some cyrillic.
Do I have to update to Php 5.0 . I hope not, because I'm not very good in that sort of thing (I just have undergone a torment of one week updating Mysql).
Is "htmlentities" -function the only way to do it? Is there any other way I could make Php understand unicode. I have gotten an impression that in 5.0 it would be a bit more straightforward.
If "htmlentities" is the only way, then how is it actually used?
PS. I think I have made a personal record. I searched Google with string "'php 4.3' mysql unicode cyrillic". I got 2420 hits. But the first three ones were my own messages on different forums
Unicode and Php 4.3.0
Moderator: General Moderators
I really don't have a clue, but this might be something that would help:
http://php.net/mbstring
http://php.net/mbstring
Unicode is something PHP doesn't really care about much, if you want to get the 8bit charcodes you can decode using utf8decode (or something like that), thus discarding unicode-information... if you want the user to see the unicode just echo it, browser is the responsible part, if you want to use unicode you can force it by using header() ...
HOWEVER, not that if you use unicode, all must be unicode or things will likely start <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> up (such as "åäö" and certain chars).
HOWEVER, not that if you use unicode, all must be unicode or things will likely start <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> up (such as "åäö" and certain chars).
You can always use the http://www.php.net/mbstring extension which works relatively nice 
OK, I'll go for mbstring. But obviously I have to install it first. That's a hard part.
I installed my server about two years ago. It sure consumed a lot of time and cigarrettes. Since then I've been just using it (designing web pages, using Php and Mysql a lot). I have never since installed anything from a source. Mysql upgrade I did from a bimary source.
Am I supposed to make a change in some Php configuration file and then run "make" and "install" commands? If yes, then I guess it matters in which directory I give these commands. How would my electric brain otherwise know what to make and what to install?
The problem with manuals is that they explain very thoroughly what to do when installing something. But I never found a HOWTO about reinstalling something because some little bit or piece is lacking. I suppose the way of doing this is considered self-evident. But nothing is self-evident for a fifty-one years old newbie, who always will be a newbie, whose memory is lot lower than it was some thirty years ago, and whose hard disk has way too many dead sectors. I hope that you young, able-bodied and -minded do not mind us old and somewhat demented hanging around here in the realm of cyberspace, but stretch a helping hand once more
PS I have SoL Distro Linux with Apache (1.3)
I installed my server about two years ago. It sure consumed a lot of time and cigarrettes. Since then I've been just using it (designing web pages, using Php and Mysql a lot). I have never since installed anything from a source. Mysql upgrade I did from a bimary source.
Am I supposed to make a change in some Php configuration file and then run "make" and "install" commands? If yes, then I guess it matters in which directory I give these commands. How would my electric brain otherwise know what to make and what to install?
The problem with manuals is that they explain very thoroughly what to do when installing something. But I never found a HOWTO about reinstalling something because some little bit or piece is lacking. I suppose the way of doing this is considered self-evident. But nothing is self-evident for a fifty-one years old newbie, who always will be a newbie, whose memory is lot lower than it was some thirty years ago, and whose hard disk has way too many dead sectors. I hope that you young, able-bodied and -minded do not mind us old and somewhat demented hanging around here in the realm of cyberspace, but stretch a helping hand once more
PS I have SoL Distro Linux with Apache (1.3)