From fc1a6328f19378a08f4ce696a865f87dcbb7bfbd Mon Sep 17 00:00:00 2001 From: gitolite tester Date: Sat, 1 Nov 2014 01:31:25 +0100 Subject: [PATCH] Add full UTF-8 support to Perl example --- examples/basic.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/basic.pl b/examples/basic.pl index c0a86a5..4f112bc 100644 --- a/examples/basic.pl +++ b/examples/basic.pl @@ -1,11 +1,15 @@ +#!/bin/env perl package SweGlib; +use utf8; use strict; use POSIX; use Glib::Object::Introspection; use Data::Dumper; +binmode STDOUT, ':encoding(UTF-8)'; + Glib::Object::Introspection->setup(basename => 'SweGlib', version => '2.0', package => 'SweGlib'); package main; @@ -51,4 +55,3 @@ foreach my $antiscion (@{$all_antiscia}) { printf("%s is antiscion of %s on axis %s (±%.2f%%)\n", $planet1->get_planet_info()->get_name(), $planet2->get_planet_info()->get_name(), $antiscion->get_antiscion_axis_info()->get_name(), $antiscion->get_difference()); } } -