Help - Search - Members - Calendar
Full Version: entity encoding
Movable Type Community Forum > Additional Resources > Tips and Tricks
bchaplin
As far as I can tell, MT encodes non-ASCI characters (like the Spanish n with a tilde on top of it, for instance), into HTML entities.

Does anyone know where I could find the MT Perl script that does that? I am trying to write something similar for a part of my site that is non-MT-driven, and need an example of the code to use.
kadyellebee
/lib/MT/util.pm has several functions in it that encode -- the HighAscii section may be what you are looking for.

You might also take a look at some of the PHP functions that deal with special characters -- first glance, I saw get_html_translation_table that might be helpful. smile.gif

Kristine
bchaplin
Thank you! /lib/MT/util.pm was exactly what I was looking for. It led me to a Perl module, HTML::Entities, which does the encoding.
kadyellebee
I'm glad that helped. smile.gif

Kristine
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.