Changeset dfb3e12 in git


Ignore:
Timestamp:
21/09/11 01:29:59 (8 years ago)
Author:
Olly Betts <olly@…>
Branches:
svn/1.0, svn/tags/1.0.40
Children:
95f9e01
Parents:
a2c91ef
Message:

Backport change from 1.2.0:
lib/fixmsgs.pl: Update to fix UTF-8 rather than ISO8859-1.

git-svn-id: file:///home/survex-svn/survex/branches/1.0@3731 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    ra2c91ef rdfb3e12  
     1Wed Sep 21 00:29:31 GMT 2011  Olly Betts <olly@survex.com>
     2
     3        * Backport change from 1.2.0:
     4        * lib/fixmsgs.pl: Update to fix UTF-8 rather than ISO8859-1.
     5
    16Wed Sep 21 00:20:26 GMT 2011  Olly Betts <olly@survex.com>
    27
  • lib/fixmsgs.pl

    ra2c91ef rdfb3e12  
    11#!/usr/bin/perl -w
    22require 5.008;
    3 use bytes;
     3use open ':encoding(utf8)';
    44use strict;
    55
     
    77
    88my @ent = ();
    9 for (128..255) {
     9for (128..65536) {
    1010   $ent[$_] = "#$_";
    1111}
     
    2626   my ($pre, $msg) = /^([-\w,]+:\s*\d+\s+)(.*)/;
    2727
    28    $msg =~ s/([\x80-\xff])/"&".$ent[ord($1)].";"/ge;
     28   $msg =~ s/([\x{80}-\x{ffff}])/"&".$ent[ord($1)].";"/ge;
    2929
    3030   $msg =~ s/'\%s'/`%s'/g;
Note: See TracChangeset for help on using the changeset viewer.