This is a discussion on characters are read wrong? within the PHP Language forums, part of the PHP Programming Forums category; hi all, I use $lijst = file('lijst.txt'); to read the file 'lijst.txt' line by line. When I echo $...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hi all,
I use $lijst = file('lijst.txt'); to read the file 'lijst.txt' line by line. When I echo $lijst some chracters are changed. Original file (lijst.txt) (I'll Never Be) Maria Magdalena - Sandra (Tell It All About) Boys - Dolly Dots 9 To 5 - Dolly Parton A Brand New Day - Wiz Stars A Love Bizarre - Sheila E. A Walk In The Park - Nick Straker Band Ain't No Mountain High Enough - Boys Town Gang array $lijst contains: (Tell It All About) Boys â?" Dolly Dots 9 To 5 â?" Dolly Parton A Brand New Day â?" Wiz Stars A Love Bizarre â?" Sheila E. A Walk In The Park â?" Nick Straker Band Ainâ?Tt No Mountain High Enough â?" Boys Town Gang the -, and ' characters are changed. Someone knwos why this is and what can be done? Regards Stijn |
|
|||
|
Stijn Goris <mepisto@hotmail.com> wrote:
[orignal] > Ain't No Mountain High Enough - Boys Town Gang [file()] > Ain??Tt No Mountain High Enough ??" Boys Town Gang > > the -, and ' characters are changed. Someone knwos why this is and what can > be done? How are you testing this? First line is plain old ASCII, second one looks like UTF-8 displayed as iso8859-1. Does the original actually include simple ' and - characters, or is your editor playing tricks on you (much like Andy suggested in you explode question). Putting both the original file and the php processing it online would really be helpfull IMHO. -- Daniel Tryba |
|
|||
|
On Sat, 9 Oct 2004 15:23:57 +0200, "Stijn Goris" <mepisto@hotmail.com> wrote:
>I use $lijst = file('lijst.txt'); to read the file 'lijst.txt' line by >line. When I echo $lijst some chracters are changed. > >Original file (lijst.txt) >(I'll Never Be) Maria Magdalena - Sandra >(Tell It All About) Boys - Dolly Dots >9 To 5 - Dolly Parton >A Brand New Day - Wiz Stars >A Love Bizarre - Sheila E. >A Walk In The Park - Nick Straker Band >Ain't No Mountain High Enough - Boys Town Gang > >array $lijst contains: >(Tell It All About) Boys â?" Dolly Dots >9 To 5 â?" Dolly Parton >A Brand New Day â?" Wiz Stars >A Love Bizarre â?" Sheila E. >A Walk In The Park â?" Nick Straker Band >Ainâ?Tt No Mountain High Enough â?" Boys Town Gang > >the -, and ' characters are changed. Someone knwos why this is and what can >be done? See my reply to your other post - they're almost certainly not - and ', they're em-dash and left- and right-quotes (a.k.a. "smart quotes"). These don't exist in the iso8859-1 character set encoding, as commonly used on the web. In fact, the way they're being converted into three characters looks a lot like UTF-8, although I've not checked the character values you've posted. -- Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool |