Han_Spacedhan.txt   [plain text]


#--------------------------------------------------------------------
# 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:] ;