From: Arthur Reutenauer <arthur.reutenauer@normalesup.org>
To: news3@nililand.de, mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Unicode question
Date: Thu, 12 Mar 2015 16:35:47 +0000 [thread overview]
Message-ID: <b8la43pv1kymgb99mogkyxdr.1426178147054@email.android.com> (raw)
In-Reply-To: <xj7eosydgays$.dlg@nililand.de>
[-- Attachment #1.1: Type: text/plain, Size: 897 bytes --]
> The luatex code contains the lines (in unistring.w)
>
> if (val == 0xFFFD)
> utf_error();
> return (val);
>
> in a function str2uni. I didn't really try to understand the code
> but it looks as if 0xFFFD is used as "invalid marker":
Interesting. This is not actually correct, U+FFFD is a valid Unicode character; it would be better to use U+FFFE or U+FFFF for that.
Note that U+FFFD is the recommended character to use when a character can't be recognised while converting to Unicode from another encoding, so its presence is usually a sign that something went wrong upstream, but I assume Manfred is aware of that.
> The comment in the code says
>
> /* the 5- and 6-byte UTF-8 sequences generate integers
>
> that are outside of the valid UCS range, and therefore
>
> unsupported
> */
That's correct, the longest valid UTF-8 sequence is 4 bytes.
Best,
Arthur
[-- Attachment #1.2: Type: text/html, Size: 1225 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2015-03-12 16:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 7:48 Manfred Lotz
2015-03-12 15:41 ` Ulrike Fischer
2015-03-12 16:35 ` Arthur Reutenauer [this message]
2015-03-12 18:08 ` Manfred Lotz
2015-03-12 19:04 ` Hans Hagen
2015-03-12 17:57 ` Manfred Lotz
2015-03-12 18:55 ` Hans Hagen
2015-03-12 20:41 ` luigi scarso
2015-03-12 20:52 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b8la43pv1kymgb99mogkyxdr.1426178147054@email.android.com \
--to=arthur.reutenauer@normalesup.org \
--cc=news3@nililand.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).