1 # ***************************************************************************
3 # * Copyright (C) 2004-2016, International Business Machines
4 # * Corporation; Unicode, Inc.; and others. All Rights Reserved.
6 # ***************************************************************************
7 # File: Han_Latin_Names.txt
11 # This transform is primarily intended to produce readings for Chinese surnames, or for full
12 # Chinese personal names - surname first - that occur at the beginning of a contiguous Han substring
13 # (i.e. at the beginning of text, or immediately preceded by space or other non-Han characters).
14 # Several Han characters have different readings in surnames, than the readings found in Han-Latin.
16 # Insert marker at start of each Han sequence (including Han after space).
17 # Do this before ::Han-Spacedhan() to catch Han after space in original text,
18 # and to apply before all other rules.
19 $startOfHanMarker = \uFDD1;
20 [:^script=Han:] { ([:script=Han:]) → $startOfHanMarker $1;
21 # Need Spacedhan so the name transliterations get spaced properly
23 # Convert special name readings that depend on next character
27 # The following maps 长 to the standard Han-Latin reading zhǎng for this case,
28 # to override the normal Han-Latin/Names reading 长→cháng further below
29 $startOfHanMarker{ 长 } \u0020? 孙 →zhǎng;
30 # Convert single characters with special name readings
31 $startOfHanMarker{ 秘→bì;
32 $startOfHanMarker{ 卜→bǔ;
34 $startOfHanMarker{ 种→chóng;
35 $startOfHanMarker{ 重→chóng;
36 $startOfHanMarker{ 刀→diāo;
39 $startOfHanMarker{ 盖→gě;
40 $startOfHanMarker{ 过→guō;
41 $startOfHanMarker{ 华→huà;
42 $startOfHanMarker{ 纪→jǐ;
44 $startOfHanMarker{ 牟→mù;
45 $startOfHanMarker{ 区→ōu;
46 $startOfHanMarker{ 繁→pó;
48 $startOfHanMarker{ 任→rén;
49 $startOfHanMarker{ 单→shàn;
50 $startOfHanMarker{ 召→shào;
51 $startOfHanMarker{ 折→shé;
52 $startOfHanMarker{ 舍→shè;
53 $startOfHanMarker{ 沈→shěn;
56 $startOfHanMarker{ 解→xiè;
58 $startOfHanMarker{ 燕→yān;
59 $startOfHanMarker{ 尉→yù;
60 $startOfHanMarker{ 乐→yuè;
61 $startOfHanMarker{ 员→yùn;
62 $startOfHanMarker{ 查→zhā;
65 # Convert $startOfHanMarkers to space, or to nothing if they are at the beginning of text.
66 # Need to do this as a separate pass to get the spacing right.
68 [^$]{ $startOfHanMarker →\u0020;
70 # Then run the normal Han-Latin transform for the rest