HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
bug fixes in tag line
Hi all,
I found the bug, which causes extended characters (\241 ...)striping in
the tag line. The problem is in the PCFFont.c++ file.
511 for (const char* cp = text; *cp; cp++)
{
512 u_int g =
*cp;
513 charInfo* ci = (firstCol <= g && g <= lastCol)
?
encoding[g - firstCol] : cdef;
When *cp reaches symbol with code more than 127, it takes value <0 (I
don't know why this happens...). Because of this (512) u_int g becomes
undefined and condition in 513 always fail, thus resetting ci to cdef
(default symbol, witch in most cases is space). So all international
characters looks like blank spaces.
I have some fast and ugly solution for this problem and it looks like:
511 for (const char* cp = text; *cp; cp++)
{
512 int g_temp=
*cp;
513 if ( g_temp < 0) { g_temp = g_temp + 256
;}
514 u_int g =
g_temp;
516 charInfo* ci = (firstCol <= g && g <= lastCol)
?
encoding[g - firstCol] : cdef;
(Sorry... C++ gurus, I need You help !!!)
Maybe this problem exist only on Linux systems (I have RedHat 5.0 with
most of the patches released at this time and HylaFAX 4.0pl2)? Any help,
ideas, patches very appreciated.
Kestas