You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Amit Rana <ra...@solis.jp> on 2003/07/01 12:16:49 UTC

0xfffd

Hi,

	I am trying to make a search on
http://www2.ipdl.jpo.go.jp/beginner_tm/TM_AREA.cgi , the text box only
accepts double byte values.

	After sending an Http Post request using HttpClient, server
responds by saying "no input was given". Following is what HttpClient
sends for the variable:
2003/07/01 18:39:35:924 JST [DEBUG] wire - ->> "key01:
[0xfffd][0xfffd][0xfffd]{
[0xfffd][0xfffd][\r][\n]"

1. What does this 0xfffd means? Why is server treating this as null?
2. Do I need to set some encoding type for data to be sent or is there
anything extra I need to do to send double byte characters values for
post variables?

Thanks in advance.

Regards,
Amit.


Re: 0xfffd

Posted by Laura Werner <la...@lwerner.org>.
Hi Amit,

0xFFFD is the Unicode "replacement character".  It's substituted into a 
character conversion output in cases where the destination character set 
has no character corresponding to a character in the input string.  It's 
hard to know without seeing your code or a trace log, but I suspect you 
need to set the request's character set.  You can do this with something 
like HttpMethod.setRequestHeader("Content-Type", "multipart/form-data; 
charset=shift-jis"), substituting whatever content type and character 
sets the server is expecting.

-- Laura


Amit Rana wrote: