Hi Jose,
Thanks for your explanation!
I suggest to explicitly set the locale to C/POSIX in the text module
unit tests (and not to rely on maint.mk to do it) except when testing
specific features needing another locale (such as the turkish,
upper-lower case and comparison scenario).
In fact, I avoided the need of the specific turkish locale info by
testing the upper/lower case stuff with PDF strings in UTF-16BE and
country/lang info embedded. So we can set the locale equal to 'C' in all
the text module unit tests without any problem.
/* Get system default locale name and check it */
locale_name = gl_locale_name(LC_CTYPE, "LC_CTYPE");
- if((locale_name == NULL) || \
- (strlen(locale_name)< 2))
+ if (locale_name == NULL)
{
PDF_DEBUG_BASE("Invalid locale info detected! '%s'",
((locale_name!=NULL) ? locale_name : "null"));
return PDF_ETEXTENC;
}
As you now just check if locale_name is NULL, there is no need to check
it again within the debug message. So the debug message could be just:
PDF_DEBUG_BASE("Invalid locale info detected! (null)");
All the other stuff seems to be ok for me.
Did you check the unit tests with this change?
Cheers!
-Aleksander