By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,640 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,640 IT Pros & Developers. It's quick & easy.

why can't php write a unicode text file?

P: n/a
I can't find any way of writing a unicode, or UTF-8 format text file.
Right now i have a Unicode string that i write to the text file and
the unicode characters are replaced with ANSI question marks '?'.
Please, How do i accomplish this?

I've been searching for a solution for weeks... why has nobody even
asked this question? shouldn't it be a FAQ?
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I noticed that Message-ID:
<1b**************************@posting.google.com > from burdeen contained
the following:
I can't find any way of writing a unicode, or UTF-8 format text file.
Right now i have a Unicode string that i write to the text file and
the unicode characters are replaced with ANSI question marks '?'.
Please, How do i accomplish this?

I've been searching for a solution for weeks... why has nobody even
asked this question? shouldn't it be a FAQ?


Did you search the manual? <grin>

http://uk.php.net/manual/en/language.types.string.php

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2

P: n/a
On 7 Apr 2004 06:58:53 -0700, pa*********@kingproducts.com (burdeen) wrote:
I can't find any way of writing a unicode, or UTF-8 format text file.
Right now i have a Unicode string that i write to the text file and
the unicode characters are replaced with ANSI question marks '?'.
Please, How do i accomplish this?
'Just Do It'. It's unlikely PHP is changing the characters, and not as part of
writing it to a file anyway, as it barely knows about multibyte encodings
(other than the mbstring extension). It'll just write it as raw data.

Post a short runnable example demonstrating your problem.
I've been searching for a solution for weeks... why has nobody even
asked this question? shouldn't it be a FAQ?


If nobody asks it, how can it be a Frequently Asked Question?
Maybe it's a NAQ (Never Asked Question)?

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #3

P: n/a
"burdeen" <pa*********@kingproducts.com> wrote in message
news:1b**************************@posting.google.c om...
I can't find any way of writing a unicode, or UTF-8 format text file.
Right now i have a Unicode string that i write to the text file and
the unicode characters are replaced with ANSI question marks '?'.
Please, How do i accomplish this?

I've been searching for a solution for weeks... why has nobody even
asked this question? shouldn't it be a FAQ?


Open the text file with Internet Explorer and see what happens.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.