Results 1 to 1 of 1

Thread: Posting thai characters in a form

  1. #1
    Join Date
    Apr 2009
    Posts
    5
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Posting thai characters in a form

    Hi,

    I have written a form to submit thai character so that I can later enter it into a MSSQL DB. I am in a dotnet environment but this is asp scripting.

    The thing is that the request.form does not always give me the characters posted. When i enter แฟพ and i write the response I get แฟพ which is the same so no worries. Now i enter ซีดี and I get ๏ฟฝีด๏ฟฝ. Isn't that wierd?

    I am going tingtong here (thai for crazy).

    I have set the characterset using:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Response.Charset = "windows-874"
    End Sub

    And here is the code of the page:

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="translatetest.aspx.vb" Inherits="translatetest" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>Untitled Page</title>

    </head>
    <%
    Response.Write((Request("thai")))
    %>
    <body>
    <form name=form1 action="translatetest.aspx" method="post">
    <div>
    <input type=text name="thai" />
    <input type=submit name=go value=go />
    </div>
    </form>
    </body>
    </html>
    Last edited by mo3s; 04-18-2009 at 01:04 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •