1 min

Working with unicode from javascript via ajax

http://en.wikipedia.org/wiki/Utf-8
UCS Transformation Format - 8-bit
UCS = Universal Character Set

http://stackoverflow.com/questions/809620/utf8-or-utf-8

http://www.ietf.org/rfc/rfc3629

on the server, use:
http://search.cpan.org/~taniguchi/URI-Escape-JavaScript-0.04/lib/URI/Escape/JavaScript.pm

in conjunction with HTML::Entities::encode

http://en.wikibooks.org/wiki/Perl_Programming/Unicode_UTF-8

44 recipes for working with Unicode in Perl 5.
http://www.perl.com/pub/2012/04/perlunicook-standard-preamble.html

unicode tables

http://www.utf8-chartable.de/unicode-utf8-table.pl?start=8192&htmlent=1

http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html

http://www.javascripter.net/faq/mathsymbols.htm

HTML Entities or Not

http://stackoverflow.com/questions/4696499/meta-charset-utf-8-vs-meta-http-equiv-content-type

Also you should not use HTML entities in UTF-8. Characters like the copyright symbol should be typed directly. The only entities you should use are for the 5 reserved markup characters: less than, greater than, ampersand, prime, double prime.

Entities need an HTML parser, which you may not always want to use going forward, they introduce errors, make your code less readable, increase your file sizes, and sometimes decode incorrectly in various browsers depending on which entities you used.

Learn how to type/insert copyright, trademark, open quote, close quote, apostrophe, em dash, en dash, bullet, Euro, and any other characters you encounter in your content, and use those actual characters in your code.

An HTML document with valid HTML5, UTF-8 encoding, and Unix line endings is a job well done. You can share and edit and store and read and recover and rely on that document in many contexts. It's lingua franca. It's digital paper.

#unicode
#perl

From JR's : articles
200 words - 1798 chars - 1 min read
created on
updated on
import date 2013-08-12 21:52:39 - #
source - versions - backlinks



A     A     A     A     A

© 2013-2017 JotHut - Online notebook

current date: Nov 14, 2024 - 9:46 p.m. EST