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

Started by Andrew Dunstanover 18 years ago6 messagescomitters
Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

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)

#2Oleg Bartunov
oleg@sai.msu.su
In reply to: Andrew Dunstan (#1)
Re: pgsql: Allow for X as well as x to be the prefix for hexadecimal

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

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Oleg Bartunov (#2)
Re: pgsql: Allow for X as well as x to be the prefix for hexadecimal

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

#4Oleg Bartunov
oleg@sai.msu.su
In reply to: Tom Lane (#3)
Re: pgsql: Allow for X as well as x to be the prefix for hexadecimal

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

#5Andrew Dunstan
andrew@dunslane.net
In reply to: Oleg Bartunov (#2)
Re: pgsql: Allow for X as well as x to be the prefix for hexadecimal

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 ?

'&#x12ab;' 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

#6Andrew Dunstan
andrew@dunslane.net
In reply to: Andrew Dunstan (#5)
Re: pgsql: Allow for X as well as x to be the prefix for hexadecimal

Andrew Dunstan wrote:

'&#x12ab;' and '&128;' are numeric character reference entities.

I mean '&#128;' of course.

cheers

andrew