From a04af526eda229b3cbbe0eda7469e73abf91efe3 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 22 Apr 2007 22:37:12 +0300 Subject: [PATCH] Bug 947, u2cp_: Use UCS_NO_BREAK_SPACE instead of 0xa0. [ Backported from commit 9d6c0b13e88c775010b91646aefd974b624fa83e in ELinks 0.12.GIT. --KON ] --- src/intl/charsets.c | 3 ++- src/intl/charsets.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/intl/charsets.c b/src/intl/charsets.c index d25c558f6..3d20db7d3 100644 --- a/src/intl/charsets.c +++ b/src/intl/charsets.c @@ -141,7 +141,8 @@ u2cp_(unicode_val_T u, int to, int no_nbsp_hack) if (u < 128) return strings[u]; /* To mark non breaking spaces, we use a special char NBSP_CHAR. */ - if (u == 0xa0) return no_nbsp_hack ? " " : NBSP_CHAR_STRING; + if (u == UCS_NO_BREAK_SPACE) + return no_nbsp_hack ? " " : NBSP_CHAR_STRING; if (u == 0xad) return ""; if (u < 0xa0) { diff --git a/src/intl/charsets.h b/src/intl/charsets.h index b99d3e67a..35b1a6bfd 100644 --- a/src/intl/charsets.h +++ b/src/intl/charsets.h @@ -3,6 +3,9 @@ typedef uint32_t unicode_val_T; +/* U+00A0 NO-BREAK SPACE. */ +#define UCS_NO_BREAK_SPACE ((unicode_val_T) 0x00A0) + /* UCS/Unicode replacement character. */ #define UCS_NO_CHAR ((unicode_val_T) 0xFFFD)