MT-Textile 2.0.2
Available here.
The weird problem that this update addresses is a glitch in a particular edition of Perl. Specifically 5.8.0 with the 18379 maintenance patch. For example, that version of Perl causes this to break:
use Encode;
my $str = 'a';
$str = Encode::decode('iso-8859-1', $str);
if ($str =~ m/^([^\s]*?)$/) {
print "found $1\n";
} else {
print "no match\n";
}
Under most versions of Perl (that have utf8 string support), this will print:
found a
But for Perl 5.8.0, with the 18379 maintenance patch, it prints:
no match
Very odd indeed. Thats a very basic regex failure for utf8 strings, don't you think?
In fact, you can eliminate the decode operation and produce the same failure by changing it to this:
Encode::_utf8_on($str);
Which just flips the little 'utf8' flag on $str. This should have no adverse effect to 7-bit ASCII data, but it does alter how that regex operation matches.
In any case, this particular issue has been a real annoyance. In MT-Textile, what I want to do is this:
- Take the raw byte data as provided by Movable Type
- Decode the data to native a Perl wide-character string (only if the user has Encode and if their PublishCharset is defined in mt.cfg)
- Do everything Textile would do (safely operating against multibyte characters)
- If step 2 happened, encode the data returned by Textile back to the character set identified by PublishCharset.
- Return string back to Movable Type
But with this bug, I've been forced to eliminate steps 2 and 4 which means that Textile may or may not properly handle multibyte data. That being said, I have not seen any problems with my (limited) tests with Japanese, Chinese, Korean, etc. But if you do, please report any problems you may encounter to the bugtracker.
Hi
I'm web and Movable Type very beginner. I'm trying to build a my own photoblog and I find around a link to MTextile plugin that I feel could help me. Unfortunatly It's so hard for me to understand the correct sintax to be used. Let me to give an example:
You can find here just few information about this site and me.
My self
I'm fif…Oh let’s forget the age; it doesn’t matter. Really I’m so young!
I live in Monza, close to Milan, with my wife, two beautiful twins, Alessia and Gianluca, and two cats.
My passions are photography of course, reading, music and movies. Some time I play video games, mainly RPG and Real Time Strategy. I like also trekking on mountain to get some pure air and to fix emotions through lens.
For instance on the browser instead of quote of I'm I get strange symbols, the font size doesn't look as set in the style sheet, and other.
Where I'm faulting? I think would be enough to get some suggestion to go in the right direction.
Many thanks in advance for help
Regards
Roberto