Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 193198

Output error with non US-ASCII charaters

$
0
0

Hello,

 

some of my environments are not installed with default english language and I encounter sometimes errors like this :

 

Generating VMware vSphere Health Report v5.0.2 "vmware_health_report.html" ...

 

This can take a few minutes depending on the size of your environment.

Get a cup of coffee/tea/beer and check out http://www.virtuallyghetto.com

 

Wide character in print at ./vmwarevSphereHealthCheck.pl line 554.

Can't call method "allIp" on an undefined value at ./vmwarevSphereHealthCheck.pl line 2540.

 

To solve this, I modfied the script in adding a parameter to define (and force) language settings :

 

line 141 :

 

 

locale => {
type => "=s",
help => "Session locale",
required => 0,
default => "en",
},

 

line 161 :

my ($system_name, $host_name,$hostlist,$vmlist,$service_content,$hostType,$apiType,$apiVersion,$report,$my_time,$start_time,$demo,$email,$printerfriendly,$logcount,$vmperformance,$hostperformance,$clusterperformance,$type,$clusterInput,$datacenterInput,$hostfileInput,$cluster_view,$cluster_views,$datacenter_views,$datacenter_view,$host_view,$conf,$debug,$locale);

 

line 198 :

$locale = Opts::get_option('locale');

 

line 375 :

sub getServiceInfo {

my $sc = Vim::get_service_content();

my $session_manager = Vim::get_view( mo_ref => $sc->sessionManager );

$session_manager->SetLocale(locale => Opts::get_option("locale"));

return ($sc,$sc->about->productLineId,$sc->about->apiType,$sc->about->version);

 

Do you think that it is the best solution ? Do you think that you cald add this change in the neext releases of the script ?

Many thanks for thies great script.


Viewing all articles
Browse latest Browse all 193198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>