---
# System prepended metadata

title: Punctuation Mark Tables and Codes

---

# Punctuation Mark Tables and Codes
```
#define slmtkPM_Big5_Num 350
char B_STR[9][16] = {"", "B0", "B1", "B21", "B3", "B4", "B22", "B23", "Be"};
char slmtkPM_Big5[slmtkPM_Big5_Num+1][5] = {
{  0,    0,    0,},// offset:  0, nothing
{-17,  -68, -116,},// offset:  1, Comma ，
{-29, -128, -127,},// offset:  2, 頓號 、
{-29, -128, -126,},// offset:  3, Period 。
{-17,  -68, -114,},// offset:  4, Period ． 
{-30, -128,  -89,},// offset:  5, 著重號 ‧
{-17,  -68, -101,},// offset:  6, 分號 ；
{-17,  -68, -102,},// offset:  7, 冒號 ：
{-17,  -68,  -97,},// offset:  8, Question Mark ？
{-17,  -68, -127,},// offset:  9, 驚嘆號 ！
{-17,  -72,  -80,},
{-30, -128,  -90,},// offset: 11, 刪節號 …
{-30, -128,  -91,},// offset: 12, 刪節號 ‥
{-17,  -71, -112,},// offset: 13, Comma ﹐
{-17,  -71, -111,},// offset: 14, 頓號 ﹑
{-17,  -71, -110,},//
{-62,  -73,      },// offset: 16, 間隔號 ·
{-17,  -71, -108,},// offset: 17, 分號 ﹔
{-17,  -71, -107,},// offset: 18, 冒號 ﹕
{-17,  -71, -106,},// offset: 19, Question Mark ﹖
{-17,  -71, -105,},// offset: 20, 驚嘆號 ﹗
{-17,  -67, -100,},// 
{-30, -128, -109,},// offset: 22, 破折號 –
{-17,  -72,  -79,},
{-30, -128, -108,},// offset: 24, 破折號 —
{-17,  -72,  -77,},
{-30, -107,  -76,},
{-17,  -72,  -76,},
{-17,  -71, -113,},
{-17,  -68, -120,},// offset: 29, 左夾注號 （
{-17,  -68, -119,},// offset: 30, 右夾注號 ）
{-17,  -72,  -75,},
{-17,  -72,  -74,},
{-17,  -67, -101,},
{-17,  -67,  -99,},
{-17,  -72,  -73,},
{-17,  -72,  -72,},
{-29, -128, -108,},// offset: 37, 左引號 〔
{-29, -128, -107,},// offset: 38, 右引號 〕
{-17,  -72,  -71,},
{-17,  -72,  -70,},// offset: 40
{-29, -128, -112,},//
{-29, -128, -111,},//
{-17,  -72,  -69,},
{-17,  -72,  -68,},
{-29, -128, -118,},// offset: 45, 左書名號 《
{-29, -128, -117,},// offset: 46, 右書名號 》
{-17,  -72,  -67,},
{-17,  -72,  -66,},
{-29, -128, -120,},// offset: 49, 左書名號 〈
{-29, -128, -119,},// offset: 50, 右書名號 〉
{-17,  -72,  -65,},//
{-17,  -71, -128,},//
{-29, -128, -116,},// offset: 53, 左引號 「
{-29, -128, -115,},// offset: 54, 右引號 」
{-17,  -71, -127,},
{-17,  -71, -126,},
{-29, -128, -114,},// offset: 57, 左引號 『
{-29, -128, -113,},// offset: 58, 右引號 』
{-17,  -71, -125,},
{-17,  -71, -124,},// offset: 60
{-17,  -71, -103,},// offset: 61, 左夾注號 ﹙
{-17,  -71, -102,},// offset: 62, 右夾注號 ﹚
{-17,  -71, -101,},
{-17,  -71, -100,},
{-17,  -71, -99,   },
{-17,  -71, -98,   },
{-30, -128, -104, },
{-30, -128, -103, },
{-30, -128, -100, },
{-30, -128, -99,  },
{-29, -128, -99,  },
{-29, -128, -98,  },
{-30, -128, -75,  },
{-30, -128, -78,  },
{-17, -68, -125,  },
{-17, -68, -122,  },
{-17, -68, -118,  },
{-30, -128, -69,  },
{-62, -89,        },
{-29, -128, -125, },
{-30, -105, -117, },
{-30, -105, -113, },
{-30, -106, -77,  },
{-30, -106, -78,  },
{-30, -105, -114, },
{-30, -104, -122, },
{-30, -104, -123, },
{-30, -105, -121, },
{-30, -105, -122, },
{-30, -106, -95,  },
{-30, -106, -96,  },
{-30, -106, -67,  },
{-30, -106, -68,  },
{-29, -118, -93,  },
{-30, -124, -123, },
{-62, -81,        },
{-17, -65, -93,   },
{-17, -68, -65,   },
{-53, -115,       },
{-17, -71, -119,  },
{-17, -71, -118,  },
{-17, -71, -115,  },
{-17, -71, -114,  },
{-17, -71, -117,  },
{-17, -71, -116,  },
{-17, -71, -97,   },
{-17, -71, -96,   },
{-17, -71, -95,   },
{-17, -68, -117,  },
{-17, -68, -115,  },
{-61, -105,       },
{-61, -73,        },
{-62, -79,        },
{-30, -120, -102, },
{-17, -68, -100,  },
{-17, -68, -98,   },
{-17, -68, -99,   },
{-30, -119, -90,  },
{-30, -119, -89,  },
{-30, -119, -96,  },
{-30, -120, -98,  },
{-30, -119, -110, },
{-30, -119, -95,  },
{-17, -71, -94,   },
{-17, -71, -93,   },
{-17, -71, -92,   },
{-17, -71, -91,   },
{-17, -71, -90,   },
{-17, -67, -98,   },
{-30, -120, -87,  },
{-30, -120, -86,  },
{-30, -118, -91,  },
{-30, -120, -96,  },
{-30, -120, -97,  },
{-30, -118, -65,  },
{-29, -113, -110, },
{-29, -113, -111, },
{-30, -120, -85,  },
{-30, -120, -82,  },
{-30, -120, -75,  },
{-30, -120, -76,  },
{-30, -103, -128, },
{-30, -103, -126, },
{-30, -118, -107, },
{-30, -118, -103, },
{-30, -122, -111, },
{-30, -122, -109, },
{-30, -122, -112, },
{-30, -122, -110, },
{-30, -122, -106, },
{-30, -122, -105, },
{-30, -122, -103, },
{-30, -122, -104, },
{-30, -120, -91,  },
{-30, -120, -93,  },
{-17, -68, -113,  },
{-17, -68, -68,   },
{-30, -120, -107, },
{-17, -71, -88,   },
{-17, -68, -124,  },
{-17, -65, -91,   },
{-29, -128, -110, },
{-17, -65, -96,   },
{-17, -65, -95,   },
{-17, -68, -123,  },
{-17, -68, -96,   },
{-30, -124, -125, },
{-30, -124, -119, },
{-17, -71, -87,   },
{-17, -71, -86,   },
{-17, -71, -85,   },
{-29, -113, -107, },
{-29, -114, -100, },
{-29, -114, -99,  },
{-29, -114, -98,  },
{-29, -113, -114, },
{-29, -114, -95,  },
{-29, -114, -114, },
{-29, -114, -113, },
{-29, -113, -124, },
{-62, -80,        },
{-30, -106, -127, },
{-30, -106, -126, },
{-30, -106, -125, },
{-30, -106, -124, },
{-30, -106, -123, },
{-30, -106, -122, },
{-30, -106, -121, },
{-30, -106, -120, },
{-30, -106, -113, },
{-30, -106, -114, },
{-30, -106, -115, },
{-30, -106, -116, },
{-30, -106, -117, },
{-30, -106, -118, },
{-30, -106, -119, },
{-30, -108, -68,  },
{-30, -108, -76,  },
{-30, -108, -84,  },
{-30, -108, -92,  },
{-30, -108, -100, },
{-30, -106, -108, },
{-30, -108, -128, },
{-30, -108, -126, },
{-30, -106, -107, },
{-30, -108, -116, },
{-30, -108, -112, },
{-30, -108, -108, },
{-30, -108, -104, },
{-30, -107, -83,  },
{-30, -107, -82,  },
{-30, -107, -80,  },
{-30, -107, -81,  },
{-30, -107, -112, },
{-30, -107, -98,  },
{-30, -107, -86,  },
{-30, -107, -95,  },
{-30, -105, -94,  },
{-30, -105, -93,  },
{-30, -105, -91,  },
{-30, -105, -92,  },
{-30, -107, -79,  },
{-30, -107, -78,  },
{-30, -107, -77,  },
{-30, -123, -96,  },
{-30, -123, -95,  },
{-30, -123, -94,  },
{-30, -123, -93,  },
{-30, -123, -92,  },
{-30, -123, -91,  },
{-30, -123, -90,  },
{-30, -123, -89,  },
{-30, -123, -88,  },
{-30, -123, -87,  },
{-29, -128, -95,  },
{-29, -128, -94,  },
{-29, -128, -93,  },
{-29, -128, -92,  },
{-29, -128, -91,  },
{-29, -128, -90,  },
{-29, -128, -89,  },
{-29, -128, -88,  },
{-29, -128, -87,  },
{-17, -68, -95,   },
{-17, -68, -94,   },
{-17, -68, -93,   },
{-17, -68, -92,   },
{-17, -68, -91,   },
{-17, -68, -90,   },
{-17, -68, -89,   },
{-17, -68, -88,   },
{-17, -68, -87,   },
{-17, -68, -86,   },
{-17, -68, -85,   },
{-17, -68, -84,   },
{-17, -68, -83,   },
{-17, -68, -82,   },
{-17, -68, -81,   },
{-17, -68, -80,   },
{-17, -68, -79,   },
{-17, -68, -78,   },
{-17, -68, -77,   },
{-17, -68, -76,   },
{-17, -68, -75,   },
{-17, -68, -74,   },
{-17, -68, -73,   },
{-17, -68, -72,   },
{-17, -68, -71,   },
{-17, -68, -70,   },
{-17, -67, -127,  },
{-17, -67, -126,  },
{-17, -67, -125,  },
{-17, -67, -124,  },
{-17, -67, -123,  },
{-17, -67, -122,  },
{-17, -67, -121,  },
{-17, -67, -120,  },
{-17, -67, -119,  },
{-17, -67, -118,  },
{-17, -67, -117,  },
{-17, -67, -116,  },
{-17, -67, -115,  },
{-17, -67, -114,  },
{-17, -67, -113,  },
{-17, -67, -112,  },
{-17, -67, -111,  },
{-17, -67, -110,  },
{-17, -67, -109,  },
{-17, -67, -108,  },
{-17, -67, -107,  },
{-17, -67, -106,  },
{-17, -67, -105,  },
{-17, -67, -104,  },
{-17, -67, -103,  },
{-17, -67, -102,  },
{-50, -111,       },
{-50, -110,       },
{-50, -109,       },
{-50, -108,       },
{-50, -107,       },
{-50, -106,       },
{-50, -105,       },
{-50, -104,       },
{-50, -103,       },
{-50, -102,       },
{-50, -101,       },
{-50, -100,       },
{-50, -99,        },
{-50, -98,        },
{-50, -97,        },
{-50, -96,        },
{-50, -95,        },
{-50, -93,        },
{-50, -92,        },
{-50, -91,        },
{-50, -90,        },
{-50, -89,        },
{-50, -88,        },
{-50, -87,        },
{-50, -79,        },
{-50, -78,        },
{-50, -77,        },
{-50, -76,        },
{-50, -75,        },
{-50, -74,        },
{-50, -73,        },
{-50, -72,        },
{-50, -71,        },
{-50, -70,        },
{-50, -69,        },
{-50, -68,        },
{-50, -67,        },
{-50, -66,        },
{-50, -65,        },
{-49, -128,       },
{-49, -127,       },
{-49, -125,       },
{-49, -124,       },
{-49, -123,       },
{-49, -122,       },
{-49, -121,       },
{-49, -120,       },
{-49, -119,       },
{-53, -103,       },
{-53, -119,       },
{-53, -118,       },
{-53, -121,       },
{-53, -117,       },
{-30, -106, -109, },
{-29, -128, -128, }
};


int slmtkPMPriority(const char* pm_str) {
	// priority:  0: 句號,    1: 問號,     2: 驚嘆號, 3: 分號,  4: 逗號, 
    //            5: 冒號,    6: 破折號,   7: 頓號,   8: 刪節號, 
    //            9: 左引號, 10: 左夾注號, 11: 左書名號
    //           12: 右引號, 13: 右夾注號, 14: 右書名號, 
    //           15: 間隔號, 16: 連接號,   17: 其他
    if (strcmp(pm_str, slmtkPM_Big5[3]) == 0 ||
    	strcmp(pm_str, slmtkPM_Big5[4]) == 0) {// 句號
        return 0;
    }

    if (strcmp(pm_str, slmtkPM_Big5[8]) == 0 ||// 問號
        strcmp(pm_str, slmtkPM_Big5[19]) == 0) {
        return 1;
    }

    if (strcmp(pm_str, slmtkPM_Big5[9]) == 0 ||// 驚嘆號
        strcmp(pm_str, slmtkPM_Big5[20]) == 0) {
        return 2;
    }

    if (strcmp(pm_str, slmtkPM_Big5[6]) == 0 ||// 分號
        strcmp(pm_str, slmtkPM_Big5[17]) == 0) {
        return 3;
    }

    if (strcmp(pm_str, slmtkPM_Big5[1]) == 0 ||// 逗號
        strcmp(pm_str, slmtkPM_Big5[13]) == 0) {
        return 4;
    }


    if (strcmp(pm_str, slmtkPM_Big5[7]) == 0 ||// 冒號
        strcmp(pm_str, slmtkPM_Big5[18]) == 0) {
        return 5;
    }

    if (strcmp(pm_str, slmtkPM_Big5[22]) == 0 ||// 破折號
        strcmp(pm_str, slmtkPM_Big5[24]) == 0) {
        return 6;
    }

    if (strcmp(pm_str, slmtkPM_Big5[2]) == 0 ||// 頓號
        strcmp(pm_str, slmtkPM_Big5[14]) == 0) {
        return 7;
    }
    
    if (strcmp(pm_str, slmtkPM_Big5[11]) == 0 ||// 刪節號
        strcmp(pm_str, slmtkPM_Big5[12]) == 0) {
        return 8;
    }
    
    if (strcmp(pm_str, slmtkPM_Big5[53]) == 0 ||// 左引號
        strcmp(pm_str, slmtkPM_Big5[57]) == 0 ||
        strcmp(pm_str, slmtkPM_Big5[37]) == 0) {
        return 9;
    }

    if (strcmp(pm_str, slmtkPM_Big5[29]) == 0 ||// 左夾注號
        strcmp(pm_str, slmtkPM_Big5[61]) == 0) {
        return 10;
    }

    if (strcmp(pm_str, slmtkPM_Big5[45]) == 0 ||// 左書名號
        strcmp(pm_str, slmtkPM_Big5[49]) == 0) {
        return 11;
    }

    if (strcmp(pm_str, slmtkPM_Big5[54]) == 0 ||// 右引號
        strcmp(pm_str, slmtkPM_Big5[58]) == 0 ||
        strcmp(pm_str, slmtkPM_Big5[38]) == 0) {
        return 12;
    }
    
    if (strcmp(pm_str, slmtkPM_Big5[30]) == 0 ||// 右夾注號
        strcmp(pm_str, slmtkPM_Big5[62]) == 0) {
        return 13;
    }

    if (strcmp(pm_str, slmtkPM_Big5[46]) == 0 ||// 右書名號
        strcmp(pm_str, slmtkPM_Big5[50]) == 0) {
        return 14;
    }

    if (strcmp(pm_str, slmtkPM_Big5[5]) == 0 ||// 著重號
        strcmp(pm_str, slmtkPM_Big5[16]) == 0 ) { // 間隔號
        return 15;
    }
    return 16;// 其他
}
```