I can take ANY number I want, and put %u in front of it...

That don't make it mean anything.

You also need to know the charset it came from to start with, which in
the case of MS Word, is not even a standard charset, but some made-up
proprietary random assemblege of numbers to characters they found
convenient that day.

You also might want to consider using something like FCKEditor or that
other one like it to let users compose HTML-formatted content.

On Thu, October 5, 2006 9:11 pm, Robbert van Andel wrote:
> I know it's Unicode because the javascript is encoding it as Unicode
> (and
> it's doing so correctly).  I guess the gist of my question is how to
> do I do
> a reverse.  How do I take %u2022 and get make that display as the
> bullet
> character?
>
> -----Original Message-----
> From: Dotan Cohen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 05, 2006 3:44 PM
> To: [EMAIL PROTECTED]
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Unicode Problem
>
> On 06/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> I have a webpage that allows users to post news stories for their
> department.  The site uses AJAX to send the data to the webserver.
> The
> problem I'm having is when the user uses some unicode characters like
> bullets or MS Word quotes, the page comes out weird.
>>
>> Here's the process.
>> 1. The user enters the story and clicks save.
>> 2. The javascript uses the escape function to turn the text into
>> something
> that can be posted to the server.  This function turns spaces into
> %20, but
> it turns unicode characters into a longer string like %uXXXX.
>> 3. The javascript then sends the data to the processing page.
>> 4. The PHP processing page receives the data and saves it to the
>> mySQL
> database server.
>>
>> The problem I see is that any unicode character is saved in it's
>> escaped
> unicode sequence.  For example a bullet is saved into the database as
> a
> literal %u2022.  What I need to know is what function can I use so
> that it's
> either saved as the unicode bullet character or displayed back on the
> page
> as the bullet?
>>
>> Thank you
>>
>
> I doubt that MS Word quotes are unicode. And as long as the users are
> coping/ pasting between MS products (Word->IE) you're going to have a
> hard time deciphering those funny characters. Try to encourage them to
> use Firefox, and if possible to use a UTF-8 compliant word processor.
> Mine is Kword, but I don't think that's available for Windows.
>
> Dotan Cohen
> http://what-is-what.com
> 98
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to