Re: [xml] uri-escaping



On Tue, Jul 30, 2002 at 03:19:30PM +0300, romis wrote:
As I can understand.

While calling xmlBufferWriteQuotedString text data stored in buffer after
scertain actions whith this buffer are stored by recoding function for
international languages. When I store some "href" data in russian language
i.e. even my char takes 2 bytes in node->content hens xmlNodeListGetString
returns UTF8 string too, and after that I'm dumping HTML, xmlURIEscapeStr
escapes each byte not satisfied:
 ((ch != '@') && (!IS_UNRESERVED(ch)) && (!xmlStrchr(list, ch)))
for HTMLdumping list="@/:=?;#%&". Eeach byte of 2 byte letter becames
%sequese. After that string becomes valid ASCII string and iconv can't
convert string back. Example from  http://www.w3.org/TR/xptr/#uri-escaping :

resume -> r%C3%A9sum%C3%A9

  yes that's normal.

but it dosn't work both in IE 6 or Netscape 6. When I type in form some text

  Then they are not conformant on URI escaping but I doubt it.

in russian it contains only 1 byte chars. After first XSLT transforming word
begins contains 2 byte chars. Is this right?

  for an attribute which is an URI-Reference like href, yes it's normal.
You error seems to come from the idea that you can enter text in a given locale
(like entered in the form) and use it as is without conversion as an href value,
that is wrong.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]