Hello Gisle, Gisle Aas wrote:
Jacques Deguest <[EMAIL PROTECTED]> writes:Shall I suggest to widen a bit the range of acceptable character part of a boundary without necessarily the needs of surrounding quotes? something like [\w+\-\_]+'_' is already part of \w.
Yeah, I know; just keep forgetting it.
RFC 2616 defines things like this:
CHAR = <any US-ASCII character (octets 0 - 127)>
CTL = <any US-ASCII control character
(octets 0 - 31) and DEL (127)>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
token = 1*<any CHAR except CTLs or separators>
attribute = token
value = token | quoted-string
parameter = attribute "=" value
So, "-" is an acceptable token char, so no quote is needed in this
case. I think we should extend the RE to include the rest of the
token chars as well.
Thank you Gisle and another thank you for the great public work you have
been providing us. I don't count anymore the numerous modules where your
name appear!One thing too that would be really nice to have is a convenient method to get the content charset. Right now, as far as I can tell, one need to split the content-type to get it either from the HTTP header if it exists or from the document meta information.
Since, working with Unicode makes it very convenient to work with may different charsets and to do some nice re such as \p{InKatakana}, still we need to tell Perl what is the charset to decode the data.
I do not think there would be much overhead since you are already processing the content-type field somewhere in your code.
--
Kind Regards,
Jacques Deguest,
