Results 1 to 5 of 5

Thread: มีปัญหา ในการใช้ HTTP Connection

  1. #1
    Anonymous
    Guest


    มีปัญหา ในการใช้ HTTP Connection

    result = getViaHttpConnection(url)
    หลังจากใข้คำสั่งข้างบน แล้ว นำผลมาเก็บใน result
    ซึ่งใน url นั้น ประกอบด้วย Text File ซึ่ง
    ข้างในมีข้อความภาษาไทยว่า "กระดาษทิชชู่"

    หลังจากนั้น จึงใช้คำสั่ง result.indexOf("กระ")
    ปรากฏว่ามันหาคำว่า กระ ไม่เจอ ซึ่งพอ เป็นภาษาอังกฤษ
    กลับใช้ได้ ควรแก้อย่างไรดีครับ

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Bangkok
    Posts
    187


    Re: มีปัญหา ในการใช้ HTTP Connection

    ปัญหาน่าจะมาจาก character encoding ลองเปลี่ยนเป็น unicode ดู

  3. #3
    Anonymous
    Guest


    Re: มีปัญหา ในการใช้ HTTP Connection

    String temp ="";
    for(int i=0;i<s.length();i++)
    temp = temp+(char)(s.charAt(i)+3424);

    * s เป็นสตริงที่รับมาจาก เวป

  4. #4
    Anonymous
    Guest


    Re: มีปัญหา ในการใช้ HTTP Connection

    โพสแล้วมันหายไปอะ
    String temp ="";

    for(int i=0;i<s.length();i++)
    temp = temp+(char)(s.charAt(i)-3424);

  5. #5
    Anonymous
    Guest


    Re: มีปัญหา ในการใช้ HTTP Connection

    ฮึ่ยยยยยยยยยย

    for(int i=0;iน้อยกว่า เอสดอทlength();i++)
    temp = temp+(char)(s.charAt(i)-3424);

Similar Threads

  1. เมื่อ Grub [Ubuntu 9.10] มีปัญหา
    By wertion1 in forum Linux, Unix , Window เกี่ยวกับ OS ต่างๆ
    Replies: 1
    Last Post: 20-04-2010, 03:36 PM
  2. IE เสีย มีปัญหา ใช้งานไม่เหมือนเดิม
    By Chiori203 in forum บทความ คอมพิวเตอร์ ทัวไป
    Replies: 0
    Last Post: 24-07-2009, 09:43 AM
  3. Replies: 1
    Last Post: 01-03-2008, 10:54 AM
  4. Card lan มีปัญหา
    By matrix in forum IT problem consult
    Replies: 0
    Last Post: 18-07-2007, 01:19 PM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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