Re: Simple string conversion from UCS2 to ISO8859-1

Liste des GroupesRevenir à cl c 
Sujet : Re: Simple string conversion from UCS2 to ISO8859-1
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.c
Date : 21. Feb 2025, 23:35:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vpav4f$3jdl6$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 21.02.2025 20:40, Keith Thompson wrote:
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.

Yes, that had already been pointed out upthread.

The (open) question is whether it makes sense to convert to "Latin 1"
only because it has a one-to-one mapping concerning the first UCS-2
characters, or if the underlying application of the OP wants support
of contemporary information by e.g. providing the € (Euro) sign with
"Latin 9".

 
<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.

Well, UTF-8 is an multi-octet _encoding_ for all Unicode characters,
while the ISO 8859-X family represents single octet representations.

I'm curious why the OP needs ISO8859-1 and can't use UTF-8.

I think this, or why he can't use "Latin 9", are essential questions.

It seems to have got clear after a subsequent post of the OP; some
message/data source seems to provide characters from the upper planes
of Unicode and the OP has to (or wants to) somehow map them to some
constant octet character set. - Yet there's no information provided
what Unicode characters - characters that don't have a representation
in Latin 1 or Latin 9 - the OP will encounter or not from that source.

As it sounds it all seems to make little sense.

Janis


Date Sujet#  Auteur
21 Feb 25 * Simple string conversion from UCS2 to ISO8859-165pozz
21 Feb 25 +* Re: Simple string conversion from UCS2 to ISO8859-129Richard Damon
21 Feb 25 i`* Re: Simple string conversion from UCS2 to ISO8859-128pozz
21 Feb 25 i +* Re: Simple string conversion from UCS2 to ISO8859-116Janis Papanagnou
21 Feb 25 i i+- Re: Simple string conversion from UCS2 to ISO8859-11Janis Papanagnou
21 Feb 25 i i`* Re: Simple string conversion from UCS2 to ISO8859-114Keith Thompson
21 Feb 25 i i `* Re: Simple string conversion from UCS2 to ISO8859-113Janis Papanagnou
22 Feb 25 i i  `* Re: Simple string conversion from UCS2 to ISO8859-112David Brown
22 Feb 25 i i   +* Re: Simple string conversion from UCS2 to ISO8859-15Janis Papanagnou
22 Feb 25 i i   i+- Re: Simple string conversion from UCS2 to ISO8859-11David Brown
22 Feb 25 i i   i`* Re: Simple string conversion from UCS2 to ISO8859-13Lawrence D'Oliveiro
24 Feb 25 i i   i `* Re: Simple string conversion from UCS2 to ISO8859-12Janis Papanagnou
24 Feb 25 i i   i  `- Re: Simple string conversion from UCS2 to ISO8859-11Lawrence D'Oliveiro
22 Feb 25 i i   `* Re: Simple string conversion from UCS2 to ISO8859-16Richard Damon
22 Feb 25 i i    +- Re: Simple string conversion from UCS2 to ISO8859-11David Brown
22 Feb 25 i i    +* Re: Simple string conversion from UCS2 to ISO8859-12Janis Papanagnou
23 Feb 25 i i    i`- Re: Simple string conversion from UCS2 to ISO8859-11Richard Damon
22 Feb 25 i i    +- Re: Simple string conversion from UCS2 to ISO8859-11Lawrence D'Oliveiro
23 Feb 25 i i    `- Re: Simple string conversion from UCS2 to ISO8859-11Waldek Hebisch
22 Feb 25 i +- Re: Simple string conversion from UCS2 to ISO8859-11Richard Damon
22 Feb 25 i `* Re: Simple string conversion from UCS2 to ISO8859-110Lawrence D'Oliveiro
22 Feb 25 i  `* Re: Simple string conversion from UCS2 to ISO8859-19Janis Papanagnou
22 Feb 25 i   +* Re: Simple string conversion from UCS2 to ISO8859-13Lawrence D'Oliveiro
22 Feb 25 i   i`* Re: Simple string conversion from UCS2 to ISO8859-12Janis Papanagnou
22 Feb 25 i   i `- Re: Simple string conversion from UCS2 to ISO8859-11Lawrence D'Oliveiro
23 Feb 25 i   +- Re: Simple string conversion from UCS2 to ISO8859-11James Kuyper
23 Feb 25 i   +- Re: Simple string conversion from UCS2 to ISO8859-11Lawrence D'Oliveiro
23 Feb 25 i   `* Re: Simple string conversion from UCS2 to ISO8859-13Kaz Kylheku
24 Feb 25 i    `* Re: Simple string conversion from UCS2 to ISO8859-12Janis Papanagnou
24 Feb 25 i     `- Re: Simple string conversion from UCS2 to ISO8859-11Lawrence D'Oliveiro
21 Feb 25 +* Re: Simple string conversion from UCS2 to ISO8859-12David Brown
21 Feb 25 i`- Re: Simple string conversion from UCS2 to ISO8859-11pozz
21 Feb 25 +* Re: Simple string conversion from UCS2 to ISO8859-130Keith Thompson
22 Feb 25 i`* Re: Simple string conversion from UCS2 to ISO8859-129David Brown
24 Feb 25 i `* Re: Simple string conversion from UCS2 to ISO8859-128pozz
24 Feb 25 i  `* Re: Simple string conversion from UCS2 to ISO8859-127Lawrence D'Oliveiro
25 Feb 25 i   +* Re: Simple string conversion from UCS2 to ISO8859-12pozz
25 Feb 25 i   i`- Re: Simple string conversion from UCS2 to ISO8859-11Lawrence D'Oliveiro
25 Feb 25 i   `* Re: Simple string conversion from UCS2 to ISO8859-124pozz
25 Feb 25 i    `* Re: Simple string conversion from UCS2 to ISO8859-123Richard Damon
25 Feb 25 i     `* Re: Simple string conversion from UCS2 to ISO8859-122pozz
25 Feb 25 i      +* Re: Simple string conversion from UCS2 to ISO8859-115David Brown
26 Feb 25 i      i`* [OT] Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)14Janis Papanagnou
26 Feb 25 i      i +* Re: [OT] Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)2David Brown
26 Feb 25 i      i i`- Re: [OT] Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)1Janis Papanagnou
26 Feb 25 i      i `* Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)11Lawrence D'Oliveiro
27 Feb 25 i      i  `* Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)10Janis Papanagnou
27 Feb 25 i      i   `* Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)9David Brown
27 Feb 25 i      i    +- Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)1Richard Heathfield
27 Feb 25 i      i    +* Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)5bart
28 Feb 25 i      i    i+* Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)2Lawrence D'Oliveiro
28 Feb 25 i      i    ii`- Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)1Janis Papanagnou
28 Feb 25 i      i    i+- Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)1James Kuyper
28 Feb 25 i      i    i`- Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)1David Brown
28 Feb 25 i      i    `* Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)2Janis Papanagnou
28 Feb 25 i      i     `- Re: Standards (was Re: Simple string conversion from UCS2 to ISO8859-1)1David Brown
25 Feb 25 i      +* Re: Simple string conversion from UCS2 to ISO8859-13Lawrence D'Oliveiro
25 Feb 25 i      i+- Re: Simple string conversion from UCS2 to ISO8859-11pozz
26 Feb 25 i      i`- Re: Simple string conversion from UCS2 to ISO8859-11Richard Damon
26 Feb 25 i      `* Re: Simple string conversion from UCS2 to ISO8859-13Lawrence D'Oliveiro
26 Feb 25 i       `* Re: Simple string conversion from UCS2 to ISO8859-12Keith Thompson
26 Feb 25 i        `- Re: Simple string conversion from UCS2 to ISO8859-11David Brown
22 Feb 25 +- Re: Simple string conversion from UCS2 to ISO8859-11Kaz Kylheku
25 Feb 25 +- Re: Simple string conversion from UCS2 to ISO8859-11Richard Harnden
1 Mar 25 `- Re: Simple string conversion from UCS2 to ISO8859-11Geoff

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal