blob: 85607b58e72c15431247c1a5945249ada338217a [file] [log] [blame]
#--------------------------------------------------------------------
# Copyright (c) 1999-2004, International Business Machines
# Corporation and others. All Rights Reserved.
#--------------------------------------------------------------------
# Only intended for internal use
:: fullwidth-halfwidth;
。 > '.';
$terminalPunct = [\.\,\:\;\?\!.,:?!。、;[:Pe:][:Pf:]];
$initialPunct = [:Ps:][:Pi:];
# add space between any Han or terminal punctuation and letters, and
# between letters and Han or initial punct
[[:Ideographic:] $terminalPunct] {} [:Letter:] > ' ' ;
[:Letter:] [:Mark:]* {} [[:Ideographic:] $initialPunct] > ' ' ;
# remove spacing between ideographs and other letters
< [:Ideographic:] { ' ' } [:Letter:] ;
< [:Letter:] [:Mark:]* { ' ' } [:Ideographic:] ;