PUT data into a UNICODE file

Discussion in 'ASP General' started by raj.sinha@gmail.com, Apr 24, 2006.

  1. Guest

    I have to "PUT" data to a Unicode file... a file that has the "FF FE"
    mark at the beginning of the file.

    How do i do that. What HTTP header do i need to send so that the data
    is stored in the Unicode file. Right now when i "PUT" the data it sores

    it in a regular file.


    Test code below


    Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")


    ' Opens the connection to the remote server.
    xml.Open "PUT", "http://135.8.63.61/outlook/save.txt", False


    ' Try these headers
    'xml.setRequestHeader "Charset", "UTF-16"
    'xml.setRequestHeader "Charset", "text/html; charset=UTF-16"


    ' Actually Sends the request and returns the data:
    xml.Send "hello"


    If xml.Status >= 400 And xml.Status <= 599 Then
    Response.Write "Error Occurred : " & xml.Status & " - " &
    xml.statusText
    Else
    Response.Write xml.ResponseText
    End If


    Set xml = nothing
     
    , Apr 24, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fritz Bayer
    Replies:
    5
    Views:
    24,740
    Fritz Bayer
    Oct 25, 2004
  2. Replies:
    1
    Views:
    645
    steve
    Dec 24, 2004
  3. Harry Zoroc
    Replies:
    1
    Views:
    1,189
    Gregory Vaughan
    Jul 12, 2004
  4. Rigs
    Replies:
    2
    Views:
    1,547
  5. Replies:
    5
    Views:
    640
    Dimitre Novatchev
    Sep 23, 2006
  6. Mark
    Replies:
    0
    Views:
    876
  7. loyed.preetham

    how to put xml data into database

    loyed.preetham, Oct 11, 2008, in forum: Java
    Replies:
    0
    Views:
    428
    loyed.preetham
    Oct 11, 2008
  8. Shaiboy_UK
    Replies:
    11
    Views:
    427
    Shaiboy_UK
    Dec 22, 2004
Loading...