Changeset 6993


Ignore:
Timestamp:
2004-03-09T17:00:04+13:00 (20 years ago)
Author:
jrm21
Message:

allow other modules to change the encoding, instead of using the hard-coded
values in the resource file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/gsprintf.pm

    r6945 r6993  
    3434# Language-specific resource bundle
    3535my %specialresourcebundle = ();
    36 my $specialoutputencoding;
     36our $specialoutputencoding; # our, so that it can be changed outside.
    3737
    3838# Default resource bundle
     
    6666{
    6767    my ($stringkey) = @_;
    68 
    6968    # Try the language-specific resource bundle first
    7069    my $utf8string = $specialresourcebundle{$stringkey};
     
    9594
    9695    # Return the string matching the key
    97     return $utf8string if (!defined($outputencoding) || $outputstringsinUTF8);
     96    return $utf8string if (!defined($outputencoding) || $outputstringsinUTF8
     97               || $outputencoding eq "utf8");
    9898
    9999    # If an 8-bit output encoding has been defined, encode the string appropriately
Note: See TracChangeset for help on using the changeset viewer.