Re: Convert Charatcers
Re: Convert Charatcers
- Subject: Re: Convert Charatcers
- From: Lorenzo <email@hidden>
- Date: Tue, 09 Mar 2004 18:26:57 +0100
Hi,
thank you Alastair. I have seen both the pages.
Which kind of approach whould you suggest?
Should I create a personal table to convert each symbol to the proper
character?
Best Regards
--
Lorenzo
email: email@hidden
>
From: Alastair Houghton <email@hidden>
>
Date: Tue, 09 Mar 2004 17:09:04 +0000
>
To: Lorenzo <email@hidden>
>
Cc: email@hidden
>
Subject: Re: Convert Charatcers
>
>
On 9 Mar 2004, at 16:12, Lorenzo wrote:
>
>
> Hi,
>
> I download an html file from the web containing symbols like
>
> ",  , ’, etc, etc.
>
>
>
> How can I convert these symbols to the right characters?
>
>
Look at this document to find-out about character references (the
>
&<whatever>; strings):
>
>
http://www.w3.org/TR/html4/charset.html#h-5.3
>
>
(BTW, ISO 10646 is equivalent to Unicode)
>
>
Then use this page to decode the named ones:
>
>
http://www.w3.org/TR/html4/sgml/entities.html
>
>
If you're rendering pages from the web, another problem that you have
>
to contend with is the ubiquity of Windows... a lot of web pages
>
inadvertently use the Windows (ANSI) character set, which could cause
>
confusion if you aren't expecting it.
>
>
The actual mechanics of converting the character data are just normal
>
string manipulation.
>
>
Kind regards,
>
>
Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.