Re: URL encoding used by Safari for non-ascii chars ??
Re: URL encoding used by Safari for non-ascii chars ??
- Subject: Re: URL encoding used by Safari for non-ascii chars ??
- From: "Alexey Proskuryakov" <email@hidden>
- Date: Sat, 08 Jan 2005 19:10:06 +0300
On Sat, 8 Jan 2005 17:56:21 +0530 "Sanjay Arora" <email@hidden> wrote:
Is there a way I can distinguish between UTF-8 stream and the decomposed UTF-8 stream.
As Safari is sending both kinds of streams to my server.
Not really; especially because you can get both pre-composed and decomposed
characters in the same URL.
You probably need to either normalize the string before processing it
(i.e., convert into some standard form, Unicode defines several of these), or
just use Unicode-aware string collation routines. It would be a good idea to
have a look at the FAQ at Unicode consortium site
(http://www.unicode.org/faq), it's very short and well written.
MacOS X provides all sorts of APIs for handling Unicode strings (see
CFString.h and UnicodeConverter.h/UnicodeUtilities.h). But if your server is
cross-platform, the best and easiest way is probably to use a library such as
ICU (http://oss.software.ibm.com/icu/).
- WBR, Alexey Proskuryakov
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden