[rt-users] Output encoding, Web vs CLI
Alberto Villanueva
alberto.villanueva at altran.es
Fri Apr 3 06:48:38 EDT 2009
I did with putty changing the translation to utf8.
Best regards,
ALBERTO VILLANUEVA VAL
Consultor
____________________________________________
Altran
ParqueEmpresarial Las Mercedes, Edificio 1
C/ Campezo, 1. 28022 Madrid
Tel : + 34 91 744 46 00
Fax: + 34 91 415 24 57
www.altran.es
-----Mensaje original-----
De: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] En nombre de Emmanuel Lacour
Enviado el: viernes, 03 de abril de 2009 12:19
Para: rt-users at lists.bestpractical.com
Asunto: [rt-users] Output encoding, Web vs CLI
Hi all,
when I run a script using RT::Interface::CLI, everything I get (such as
a CF value or correspondance) is ISO-8859-1. Same code in a mason
template in share/html give UTF-8.
Do I miss some initialization in myu script to get UTF-8?
-----script---
#!/usr/bin/perl -w
# Extract customfields
use strict;
use lib "/home/rt/rt/lib";
use RT;
use RT::Interface::CLI qw( CleanEnv GetCurrentUser );
use RT::User;
# RT CLI initialization
CleanEnv();
RT::LoadConfig();
RT::Init();
# Get the current user all loaded
our $CurrentUser = GetCurrentUser();
my $ticket = RT::Ticket->new( $CurrentUser);
$ticket->Load(13595);
if ((my $values = $ticket->CustomFieldValues ('essai')))
{
print $values->First->Content."\n";
}
-------------
-------Mason----
<%INIT>
my $ticket = RT::Ticket->new( $CurrentUser);
$ticket->Load(13595);
my $values = $ticket->CustomFieldValues ('essai');
</%INIT>
<% $values->First->Content %>
----------------
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: sales at bestpractical.com
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
More information about the rt-users
mailing list