fdo#43931 (hard hyphen hyphenation) + fdo#54843 (rhmin fix)
This commit is contained in:
parent
fc16d4340d
commit
d2dc7334af
11
ChangeLog
11
ChangeLog
|
@ -1,4 +1,13 @@
|
||||||
2010-07-18 Caolán McNamara <caolán at redhat dot com>:
|
2012-09-13 László Németh <nemeth at numbertext dot org>:
|
||||||
|
* hyphen.c: fdo#43931: removing hard hyphen hyphenation for LibreOffice
|
||||||
|
|
||||||
|
* tests/rhmin.*: add Telugu test example for rhmin fix
|
||||||
|
|
||||||
|
2012-09-11 Steven Dickson <DicksonSK at ldschurch dot org>:
|
||||||
|
* hyphen.c: fdo#54843: rhmin fix for words with 3-byte or more UTF-8
|
||||||
|
multibyte characters
|
||||||
|
|
||||||
|
2012-07-18 Caolán McNamara <caolán at redhat dot com>:
|
||||||
* coverity warnings
|
* coverity warnings
|
||||||
|
|
||||||
2011-10-10 László Németh <nemeth at numbertext dot org>:
|
2011-10-10 László Németh <nemeth at numbertext dot org>:
|
||||||
|
|
5
NEWS
5
NEWS
|
@ -1,3 +1,8 @@
|
||||||
|
2012-09-13 Hyphen 2.8.6:
|
||||||
|
- righthyphenmin fix for 3-byte or more UTF-8
|
||||||
|
multibyte characters by Steven Dickson
|
||||||
|
- fix for fdo#43931 (removing hard hyphen hyphenation for LibreOffice)
|
||||||
|
|
||||||
2012-07-12 Hyphen 2.8.5:
|
2012-07-12 Hyphen 2.8.5:
|
||||||
- fix short alloc
|
- fix short alloc
|
||||||
|
|
||||||
|
|
12
hyphen.c
12
hyphen.c
|
@ -436,9 +436,9 @@ for (k = 0; k < 2; k++) {
|
||||||
}
|
}
|
||||||
} else if (k == 1) {
|
} else if (k == 1) {
|
||||||
/* default first level: hyphen and ASCII apostrophe */
|
/* default first level: hyphen and ASCII apostrophe */
|
||||||
if (!dict[0]->utf8) hnj_hyphen_load_line("NOHYPHEN '\n", dict[k], hashtab);
|
if (!dict[0]->utf8) hnj_hyphen_load_line("NOHYPHEN ',-\n", dict[k], hashtab);
|
||||||
else hnj_hyphen_load_line("NOHYPHEN ',\xe2\x80\x93,\xe2\x80\x99\n", dict[k], hashtab);
|
else hnj_hyphen_load_line("NOHYPHEN ',\xe2\x80\x93,\xe2\x80\x99,-\n", dict[k], hashtab);
|
||||||
strncpy(buf, "1-1/=,1,1\n", MAX_CHARS-1); // buf rewritten by hnj_hyphen_load here
|
strncpy(buf, "1-1\n", MAX_CHARS-1); // buf rewritten by hnj_hyphen_load here
|
||||||
buf[MAX_CHARS-1] = '\0';
|
buf[MAX_CHARS-1] = '\0';
|
||||||
hnj_hyphen_load_line(buf, dict[k], hashtab); /* remove hyphen */
|
hnj_hyphen_load_line(buf, dict[k], hashtab); /* remove hyphen */
|
||||||
hnj_hyphen_load_line("1'1\n", dict[k], hashtab); /* ASCII apostrophe */
|
hnj_hyphen_load_line("1'1\n", dict[k], hashtab); /* ASCII apostrophe */
|
||||||
|
@ -734,13 +734,13 @@ int hnj_hyphen_lhmin(int utf8, const char *word, int word_size, char * hyphens,
|
||||||
int hnj_hyphen_rhmin(int utf8, const char *word, int word_size, char * hyphens,
|
int hnj_hyphen_rhmin(int utf8, const char *word, int word_size, char * hyphens,
|
||||||
char *** rep, int ** pos, int ** cut, int rhmin)
|
char *** rep, int ** pos, int ** cut, int rhmin)
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 0;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
// ignore numbers
|
// ignore numbers
|
||||||
for (j = word_size - 1; j > 0 && word[j] <= '9' && word[j] >= '0'; j--) i--;
|
for (j = word_size - 1; j > 0 && word[j] <= '9' && word[j] >= '0'; j--) i--;
|
||||||
|
|
||||||
for (j = word_size - 2; i < rhmin && j > 0; j--) {
|
for (j = word_size - 1; i < rhmin && j > 0; j--) {
|
||||||
// check length of the non-standard part
|
// check length of the non-standard part
|
||||||
if (*rep && *pos && *cut && (*rep)[j]) {
|
if (*rep && *pos && *cut && (*rep)[j]) {
|
||||||
char * rh = strchr((*rep)[j], '=');
|
char * rh = strchr((*rep)[j], '=');
|
||||||
|
@ -753,7 +753,7 @@ int hnj_hyphen_rhmin(int utf8, const char *word, int word_size, char * hyphens,
|
||||||
} else {
|
} else {
|
||||||
hyphens[j] = '0';
|
hyphens[j] = '0';
|
||||||
}
|
}
|
||||||
if (!utf8 || (word[j] & 0xc0) != 0xc0) i++;
|
if (!utf8 || (word[j] & 0xc0) == 0xc0 || (word[j] & 0x80) != 0x80) i++;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
övéit
|
övéit
|
||||||
|
అం=గ=డిధర
|
||||||
|
|
|
@ -2,3 +2,4 @@ UTF-8
|
||||||
RIGHTHYPHENMIN 3
|
RIGHTHYPHENMIN 3
|
||||||
% test patterns for righthyphenmin fix for UTF-8 patterns
|
% test patterns for righthyphenmin fix for UTF-8 patterns
|
||||||
övé1it
|
övé1it
|
||||||
|
అం1గ1డి1ధర
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
övéit
|
övéit
|
||||||
|
అంగడిధర
|
||||||
|
|
Loading…
Reference in New Issue