1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00

workaround of soft hyphen

This commit is contained in:
Lu Wang 2013-05-04 13:52:58 +08:00
parent ebc32a9fb1
commit 84a2490200
2 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* vim: filetype=cpp : */
/* vim: set filetype=cpp : */
/*
* css_const.h
*

View File

@ -17,7 +17,12 @@ using std::cerr;
using std::endl;
using std::ostream;
/* Test legal for HTML */
/*
* Test legal for HTML
*
* A legal unicode character should be accepted by browsers, and displayed correctly.
* This function is not complete, just to be improved.
*/
bool isLegalUnicode(Unicode u)
{
/*
@ -47,6 +52,13 @@ bool isLegalUnicode(Unicode u)
if((u >= 127) && (u <= 160))
return false;
/*
* 173, or 0xad, is the soft hyphen
* which can be ignored by the browser in the middle of a line
*/
if(u == 173)
return false;
if((u >= 0xd800) && (u <= 0xdfff))
return false;