|
Posted by HaggMan on 12/18/41 11:49
Thank you, both of you, for your help... I finally figured out what
does it:
The part I didn't mention (go figure, I thought it was harmless) is
that I was doing some str_replaces (with regex) on the UTF8 stuff, and
that is what messed up the output. So, when I accept the normal input,
save it to the file, and throw out the normal output, it comes out
exactly as I typed it (I'm testing with Arabic).
So I guess a followup question would be: How do I parse through UTF8
stuff with regexpressions? I'll do some research tomorrow.
Thank you again!
HaggMan
R. Rajesh Jeba Anbiah wrote:
> HaggMan wrote:
> > I'm creating a page that:
> > - accepts user input in whatever language
> > - saves that input to a file
> > - reads the file and displays the original input
> >
> > The following code successfully writes the user input to a file (when I
> > open the file, it's in the correct font), but I can't get PHP to read
> > the file and display the correct characters.
> <snip>
>
> Save your (processing) PHP script in UTF-8.
>
> --
> <?php echo 'Just another PHP saint'; ?>
> Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/
[Back to original message]
|