Unicode escape sequence | Re: draft-ietf-httpbis-header-structure-00, unicode range

Poul-Henning Kamp <phk@phk.freebsd.dk>: (Tue Dec 13 23:43:15 2016)
> --------
> In message <20161213175419.GA7943@LK-Perkele-V2.elisa-laajakaista.fi>, Ilari Li
> usvaara writes:
> 
> >> 3.  HTTP/1 Serialization of HTTP Header Common Structure
> >> https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-00#section-3
  
> >astral planes (and I hope the escape system there would be more sane
> >than the one JSON has...)

I think that one escape sequence is more sane than something like
\uD834\uDD1E  for one unicode codepoint.

> Any suggestions ?

Ilari Liusvaara told that 10FFFD is the last codepoint. So 6
hex digits is sufficient.

Either
	( "\" "X" 6*HEXDIG )

or

	 ( "\" "X" 1*6HEXDIG "#" )
or

	 ( "\" "#" 1*6HEXDIG "#" )

or   escape characters may be some other also. 
     This was my first suggestion. 

I did not suggested \u  or \U  because these
two are used with different length.
 
> -- 
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk@FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe    
> Never attribute to malice what can adequately be explained by incompetence.

/ Kari Hurtta

Received on Wednesday, 14 December 2016 06:29:09 UTC