-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Williams wrote:
> What you are probably seeing is perl auto-upgrading your strings to utf8
Sure is.

> Unfortunately I do not know of any elegant solution for this.  You could
> patch your version of Mason like this to make sure the string never get
> upgraded

Just my $0.02: I choose the opposite, upgrade everything to UTF8 ;-)

> utf8 handling in perl is still fraught with peril
I second you on that, working with Unicode content is a mess, but
anyway, rather than having to deal with a myriad of encodings, I always
choose Unicode... working harder (obviously) on getting "data" upgraded
to Unicode (Encode::Detect is a useful helper _usually_).

For upgrading to Unicode there is a nifty solution for Mason components:
using "preamble" parameter appropriately:

my $ah = new ...Handler->new(
  ...
  preamble => qq{use encoding 'utf8';\n},
  ...
);


Back on topic, my guess is that something similar ("preamble"), with
opposite effect could be used here too, maybe exactly what John
proposed, but I really doubt this would be a complete fix (dumb example:
<% 'some upgraded string' x 8 %>).

cheers
- --
Marius Feraru
-----BEGIN PGP SIGNATURE-----

iD8DBQFFdy87tZHp/AYZiNkRAmmvAJ940O+fsRZTY3KXzwJNKtcJu9WztQCfZBK3
2Q8LXVk30lms6Za3/wKtebc=
=OFcP
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to