To cover for the second case above (character not available on the used keyboard), XHTML has defined three sets of named character entity references.
Refer to the XHTML 1 Alphanumeric Character Entities table for a full listing.