Skip to content

Commit

Permalink
preserve all utf-8 chars if CONFIG_UNICODE_PRESERVE_BROKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot committed May 8, 2011
1 parent 12aaa1f commit 27a33d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libbb/unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void FAST_FUNC reinit_unicode(const char *LANG)
unicode_status = (width == 1 ? UNICODE_ON : UNICODE_OFF);
}

void FAST_FUNC init_unicode(void)
void FAST_FUNC init_unicode()
{
if (unicode_status == UNICODE_UNKNOWN)
reinit_unicode(getenv("LANG"));
Expand All @@ -56,7 +56,7 @@ void FAST_FUNC reinit_unicode(const char *LANG)
unicode_status = UNICODE_ON;
}

void FAST_FUNC init_unicode(void)
void FAST_FUNC init_unicode()
{
if (unicode_status == UNICODE_UNKNOWN)
reinit_unicode(getenv("LANG"));
Expand Down Expand Up @@ -1006,9 +1006,11 @@ static char* FAST_FUNC unicode_conv_to_printable2(uni_stat_t *stats, const char
} else {
d = dst = xstrndup(src, width);
while (*d) {
#if !ENABLE_UNICODE_PRESERVE_BROKEN
unsigned char c = *d;
if (c < ' ' || c >= 0x7f)
*d = '?';
#endif
d++;
}
}
Expand Down

1 comment on commit 27a33d5

@tpruvot
Copy link
Owner Author

@tpruvot tpruvot commented on 27a33d5 May 9, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.