utf_allow_break_before(int cc)
{
    static const int BOL_prohibition_punct[] =
    {
	'!',
	'%',
	')',
	',',
	':',
	';',
	'>',
	'?',
	']',
	'}',
	0x2019, // ’ right single quotation mark
	0x201d, // ” right double quotation mark
	0x2020, // † dagger
	0x2021, // ‡ double dagger
	0x2026, // … horizontal ellipsis
	0x2030, // ‰ per mille sign
	0x2031, // ‱ per then thousand sign
	0x203c, // ‼ double exclamation mark
	0x2047, // ⁇ double question mark
	0x2048, // ⁈ question exclamation mark
	0x2049, // ⁉ exclamation question mark
	0x2103, // ℃ degree celsius
	0x2109, // ℉ degree fahrenheit
	0x3001, // 、 ideographic comma
	0x3002, // 。 ideographic full stop
	0x3009, // 〉 right angle bracket
	0x300b, // 》 right double angle bracket
	0x300d, // 」 right corner bracket
	0x300f, // 』 right white corner bracket
	0x3011, // 】 right black lenticular bracket
	0x3015, // 〕 right tortoise shell bracket
	0x3017, // 〗 right white lenticular bracket
	0x3019, // 〙 right white tortoise shell bracket
	0x301b, // 〛 right white square bracket
	0xff01, // ！ fullwidth exclamation mark
	0xff09, // ） fullwidth right parenthesis
	0xff0c, // ， fullwidth comma
	0xff0e, // ． fullwidth full stop
	0xff1a, // ： fullwidth colon
	0xff1b, // ； fullwidth semicolon
	0xff1f, // ？ fullwidth question mark
	0xff3d, // ］ fullwidth right square bracket
	0xff5d, // ｝ fullwidth right curly bracket
    };

    int first = 0;
    int last  = ARRAY_LENGTH(BOL_prohibition_punct) - 1;
    int mid   = 0;

    while (first < last)
    {
	mid = (first + last)/2;

	if (cc == BOL_prohibition_punct[mid])
	    return FALSE;
	else if (cc > BOL_prohibition_punct[mid])
	    first = mid + 1;
	else
	    last = mid - 1;
    }

    return cc != BOL_prohibition_punct[first];
}
utf_allow_break_before(int cc)
{
    static const int BOL_prohibition_punct[] =
    {
	'!',
	'%',
	')',
	',',
	':',
	';',
	'>',
	'?',
	']',
	'}',
	0x2019,  
	0x201d,  
	0x2020,  
	0x2021,  
	0x2026,  
	0x2030,  
	0x2031,  
	0x203c,  
	0x2047,  
	0x2048,  
	0x2049,  
	0x2103,  
	0x2109,  
	0x3001,  
	0x3002,  
	0x3009,  
	0x300b,  
	0x300d,  
	0x300f,  
	0x3011,  
	0x3015,  
	0x3017,  
	0x3019,  
	0x301b,  
	0xff01,  
	0xff09,  
	0xff0c,  
	0xff0e,  
	0xff1a,  
	0xff1b,  
	0xff1f,  
	0xff3d,  
	0xff5d,  
    };

    int first = 0;
    int last  = ARRAY_LENGTH(BOL_prohibition_punct) - 1;
    int mid   = 0;

    while (first < last)
    {
	mid = (first + last)/2;

	if (cc == BOL_prohibition_punct[mid])
	    return FALSE;
	else if (cc > BOL_prohibition_punct[mid])
	    first = mid + 1;
	else
	    last = mid - 1;
    }

    return cc != BOL_prohibition_punct[first];
}