| Deutsch English Français Italiano |
|
<87frk7m6h5.fsf@nosuchdomain.example.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Simple string conversion from UCS2 to ISO8859-1
Date: Fri, 21 Feb 2025 11:40:38 -0800
Organization: None to speak of
Lines: 21
Message-ID: <87frk7m6h5.fsf@nosuchdomain.example.com>
References: <vp9oml$3a0k5$1@dont-email.me>
<7bf2c66d1f1ef9e92c00f44320bb998f3cea2183@i2pn2.org>
<vp9sb4$3a0k4$5@dont-email.me> <vp9tnr$3dca2$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 21 Feb 2025 20:40:39 +0100 (CET)
Injection-Info: dont-email.me; posting-host="88e67b4ed4d3ed5c836c22f277041b6f";
logging-data="3717942"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Wq3JZpI4dI5rk9B0MGkC9"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:QuWX6lo96efEnpD0t5PUKBa89qo=
sha1:JxwV9dSPAHXXASkrrVG9Regd6oI=
Bytes: 2084
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
[...]
> BTW; you may want to consider using ISO 8859-15 (Latin 9) instead
> of ISO 8859-1 (Latin 1); Latin 1 is widely outdated, and Latin 9
> contains a few other characters like the € (Euro Sign). If that is
> possible for your context you have to map a handful of characters.
Latin-1 maps exactly to Unicode for the first 256 values. Latin-9 does
not, which would make the translation more difficult.
<https://en.wikipedia.org/wiki/ISO/IEC_8859-15> includes a table showing
the 8 characters that differ betwween Latin-1 and Latin-9.
If at all possible, it would be better to convert to UTF-8. The
conversion is exact and reversible, and UTF-8 has largely superseded the
various Latin-* character encodings. I'm curious why the OP needs
ISO8859-1 and can't use UTF-8.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */