Opened 16 years ago

Closed 9 years ago

#2792 closed defect (fixed)


Reported by: wxmjohn Owned by:
Priority: normal Milestone:
Component: base Version:
Keywords: wxURI Cc: wxmjohn, gerryi
Blocked By: Blocking:
Patch: no


wxURI can't deal with Asia language at UNICODE
(I have read the tracker 1213147, I suppose the
isEsacpe has no problem).

for example.

  1. this url:!Ebooks/Ansys%D6%D0%CE%

are four chinese words, there ANSI code are

after use url.Unescape() or BuildUnescapedURI(), the
right dealing should be:
transfer ansi code 0xc5ed to UNICODE then save it in
One wchar_t,
transfer ansi code 0xd1b5 to UNICODE then save it in
One wchar_t,
transfer ansi code 0xbdcc to UNICODE then save it in
One wchar_t,
transfer ansi code 0xb3cc to UNICODE then save it in
One wchar_t,.

but at the present time.
the wxURI's dealing is:
after use url.Unescape() or BuildUnescapedURI()
save 0xC5E0 it in two wchar_t(0xC5 in one
wchar_t,0xE0 in one wchar_t),
save 0xD1B5 it in two wchar_t,
save 0xBDCC it in two wchar_t,
save 0xC5E0 it in two wchar_t,
this is not right.

  1. In UNICODE version, If url has chinese words.

After get the url's value from textboxl and save it in a
wxString value. all the chinese word's code changed to
UNIOCDE, then when save it to wxURI, wxURI would use
escape to the UNIOCDE value. if send the escaped
string to server, the server would not understand it.
because reference to RFC1738, i think whether server or
client shoud escape or unesacpe ansi code not unicode.
ansi code not equal to UNICODE.

so i think shoud use char not wchat_t in

Change History (4)

comment:1 Changed 15 years ago by gerryi

This also affects file drag and drop because it uses file:
URIs internally and wxFileDataObject::SetData doesn't
convert them properly when they are escaped UTF8.

comment:2 Changed 13 years ago by wojdyr

  • Component set to base
  • Keywords wxURI added

comment:3 Changed 9 years ago by oneeyeman

Is there people who speaks Chinese? Can someone please verify that this is still the case?

comment:4 Changed 9 years ago by vadz

  • Cc vadz removed
  • Resolution set to fixed
  • Status changed from new to closed

I think this should have been fixed by r54723 (see #3874).

Note: See TracTickets for help on using tickets.