From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Unicode question
Date: Thu, 12 Mar 2015 20:04:16 +0100 [thread overview]
Message-ID: <5501E330.2000607@wxs.nl> (raw)
In-Reply-To: <20150312190806.78e55a32@arcor.com>
On 3/12/2015 7:08 PM, Manfred Lotz wrote:
> Hi Arthur,
>
> On Thu, 12 Mar 2015 16:35:47 +0000
> Arthur Reutenauer <arthur.reutenauer@normalesup.org> wrote:
>
>>> 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.
>>
>
> Yes, I'm aware of that. So I also think that it isn't correct to use
> U+FFFD for this. Your suggestion of using either U+FFFE or U+FFFF
> sounds good as both are really invalid.
it's an attempt to recover but in the process a normal 0xFFFD triggers
an error too; recovering to 0xFFFD for a really invalid input is ok as
tex does that in more cases: i expected a } so i insert one here ...
cross your fingers etc
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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 19:04 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
2015-03-12 18:08 ` Manfred Lotz
2015-03-12 19:04 ` Hans Hagen [this message]
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=5501E330.2000607@wxs.nl \
--to=pragma@wxs.nl \
--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).