summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2024-03-01 15:49:58 -0500
committerRich Felker <dalias@aerifal.cx>2024-03-01 15:49:58 -0500
commitca6f46aff1fc89c3d06ff9e85ab8c7871a695924 (patch)
tree3f011409e97a47a97b32939e8d13de26783dd1a9 /src
parent0784374d561435f7c787a555aeab8ede699ed298 (diff)
downloadmusl-ca6f46aff1fc89c3d06ff9e85ab8c7871a695924.tar.gz
iconv: add euro symbol to GBK as single byte 0x80
this is how it's defined in the cp936 document referenced by the IANA charset registry as defining GBK, and of the mappings defined there, was the only one missing. it is not accepted for GB18030, as GB18030 is a UTF and has its own unique mapping for the euro symbol.
Diffstat (limited to 'src')
-rw-r--r--src/locale/iconv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/locale/iconv.c b/src/locale/iconv.c
index 175def1c..0b2d0016 100644
--- a/src/locale/iconv.c
+++ b/src/locale/iconv.c
@@ -403,6 +403,10 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
if (c < 128) break;
if (c < 0xa1) goto ilseq;
case GBK:
+ if (c == 128) {
+ c = 0x20ac;
+ break;
+ }
case GB18030:
if (c < 128) break;
c -= 0x81;