Обсуждение: pgsql: Allow for X as well as x to be the prefix for hexadecimal

Поиск
Список
Период
Сортировка

pgsql: Allow for X as well as x to be the prefix for hexadecimal

От
adunstan@postgresql.org (Andrew Dunstan)
Дата:
Log Message:
-----------
Allow for X as well as x to be the prefix for hexadecimal character ref entity numbers,
as in HTML.

Modified Files:
--------------
    pgsql/src/backend/tsearch:
        wparser_def.c (r1.12 -> r1.13)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tsearch/wparser_def.c?r1=1.12&r2=1.13)

Re: pgsql: Allow for X as well as x to be the prefix for hexadecimal

От
Oleg Bartunov
Дата:
On Sun, 25 Nov 2007, Andrew Dunstan wrote:

> Log Message:
> -----------
> Allow for X as well as x to be the prefix for hexadecimal character ref entity numbers,
> as in HTML.

So, '&x128;' is an entity ? Is't really true ?

>
> Modified Files:
> --------------
>    pgsql/src/backend/tsearch:
>        wparser_def.c (r1.12 -> r1.13)
>        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tsearch/wparser_def.c?r1=1.12&r2=1.13)
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>

     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

Re: pgsql: Allow for X as well as x to be the prefix for hexadecimal

От
Tom Lane
Дата:
Oleg Bartunov <oleg@sai.msu.su> writes:
> On Sun, 25 Nov 2007, Andrew Dunstan wrote:
>> Allow for X as well as x to be the prefix for hexadecimal character ref entity numbers,
>> as in HTML.

> So, '&x128;' is an entity ? Is't really true ?

Well, unless you want to put in some knowledge about which identifiers
are known entities, I don't see how to reject that.  It's not a numeric
entity, sure, but it looks just like a named entity.

            regards, tom lane

Re: pgsql: Allow for X as well as x to be the prefix for hexadecimal

От
Oleg Bartunov
Дата:
On Sun, 25 Nov 2007, Tom Lane wrote:

> Oleg Bartunov <oleg@sai.msu.su> writes:
>> On Sun, 25 Nov 2007, Andrew Dunstan wrote:
>>> Allow for X as well as x to be the prefix for hexadecimal character ref entity numbers,
>>> as in HTML.
>
>> So, '&x128;' is an entity ? Is't really true ?
>
> Well, unless you want to put in some knowledge about which identifiers
> are known entities, I don't see how to reject that.  It's not a numeric
> entity, sure, but it looks just like a named entity.
>

I see. I think in future we'll improve parser<->dictionaries interaction,
so it could be possible to have dict_html dictionary, which encapsulate
all html-specific knowledge.

     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

Re: pgsql: Allow for X as well as x to be the prefix for hexadecimal

От
Andrew Dunstan
Дата:

Oleg Bartunov wrote:
> On Sun, 25 Nov 2007, Andrew Dunstan wrote:
>
>> Log Message:
>> -----------
>> Allow for X as well as x to be the prefix for hexadecimal character
>> ref entity numbers,
>> as in HTML.
>
> So, '&x128;' is an entity ? Is't really true ?
>
>

'ካ' and  '&128;' are numeric character reference entities.

'&x128;' is (syntactically) a named entity (because there is no #
following the &).

This fix applies to numeric character reference entities, not to named
entities.


cheers

andrew

Re: pgsql: Allow for X as well as x to be the prefix for hexadecimal

От
Andrew Dunstan
Дата:

Andrew Dunstan wrote:
>
>>
>
> 'ካ' and  '&128;' are numeric character reference entities.

I mean '€' of course.


cheers

andrew