• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Convert Charatcers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert Charatcers


  • Subject: Re: Convert Charatcers
  • From: Alastair Houghton <email@hidden>
  • Date: Tue, 9 Mar 2004 17:09:04 +0000

On 9 Mar 2004, at 16:12, Lorenzo wrote:

> Hi,
> I download an html file from the web containing symbols like
> &quot, &nbsp, &#146, 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.

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


  • Follow-Ups:
    • Re: Convert Charatcers
      • From: Allan Odgaard <email@hidden>
    • Re: Convert Charatcers
      • From: cricket <email@hidden>
    • Re: Convert Charatcers
      • From: Lorenzo <email@hidden>
References: 
 >Convert Charatcers (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: Encapsulate C struct/toll-free bridging?
  • Next by Date: Re: How do I create a "small" radio button dynamically?
  • Previous by thread: Re: Convert Charatcers
  • Next by thread: Re: Convert Charatcers
  • Index(es):
    • Date
    • Thread