Professional Web Applications Themes

how to read japanese characters (multilingual characters) from a text file and save them in Access database ??? - ASP Database

HI All i m trying to read a text file, having some japanese characters and saved as UTF-8 encoding. I m using ASP,FSO ... my code is below, plz make the required changes and expalin :) Dim ObjFso,thetextdata Set ObjFso = Server.CreateObject("Scripting.FileSystemObject") Set thetextdata = ObjFso.OpenTextFile("C:\Examples\test1.txt",1) data = thetextdata.ReadAll Set thetextdata = Nothing Set ObjFso = Nothing rs.open "test",con,1,3 rs.addnew rs("adminname") = "testadmin" rs("propname") = "test" rs("propvalue") = data rs.update rs.close response.write "Done" after this only "?" question marks are stored in DB PLz Help...

  1. #1

    Default how to read japanese characters (multilingual characters) from a text file and save them in Access database ???

    HI All

    i m trying to read a text file, having some japanese characters and saved as
    UTF-8 encoding.

    I m using ASP,FSO ... my code is below, plz make the required changes and
    expalin :)

    Dim ObjFso,thetextdata
    Set ObjFso = Server.CreateObject("Scripting.FileSystemObject")
    Set thetextdata = ObjFso.OpenTextFile("C:\Examples\test1.txt",1)
    data = thetextdata.ReadAll
    Set thetextdata = Nothing
    Set ObjFso = Nothing

    rs.open "test",con,1,3
    rs.addnew
    rs("adminname") = "testadmin"
    rs("propname") = "test"
    rs("propvalue") = data
    rs.update
    rs.close

    response.write "Done"

    after this only "?" question marks are stored in DB
    PLz Help


    asim Guest

  2. #2

    Default Re: how to read japanese characters (multilingual characters) from a text file and save them in Access database ???

    Can you try something like:

    Set thetextdata =ObjFso.OpenTextFile("C:\Examples\test1.txt",1, , -1)

    The last "-1" value opens the file in unicode format.

    --
    Manohar Kamath
    Editor, .netBooks
    [url]www.dotnetbooks.com[/url]


    "asim" <qaziadvcomm.net> wrote in message
    news:uofb%23xJYDHA.2032TK2MSFTNGP10.phx.gbl...
    > HI All
    >
    > i m trying to read a text file, having some japanese characters and saved
    as
    > UTF-8 encoding.
    >
    > I m using ASP,FSO ... my code is below, plz make the required changes and
    > expalin :)
    >
    > Dim ObjFso,thetextdata
    > Set ObjFso = Server.CreateObject("Scripting.FileSystemObject")
    > Set thetextdata = ObjFso.OpenTextFile("C:\Examples\test1.txt",1)
    > data = thetextdata.ReadAll
    > Set thetextdata = Nothing
    > Set ObjFso = Nothing
    >
    > rs.open "test",con,1,3
    > rs.addnew
    > rs("adminname") = "testadmin"
    > rs("propname") = "test"
    > rs("propvalue") = data
    > rs.update
    > rs.close
    >
    > response.write "Done"
    >
    > after this only "?" question marks are stored in DB
    > PLz Help
    >
    >

    Manohar Kamath [MVP] Guest

Similar Threads

  1. Problem displaying Japanese characters
    By _funkyboy in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: April 20th, 06:25 PM
  2. Japanese characters.
    By palaksha@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 3
    Last Post: June 30th, 12:32 PM
  3. Japanese characters
    By koeniga in forum Coldfusion - Getting Started
    Replies: 7
    Last Post: May 4th, 04:58 PM
  4. Japanese Characters?
    By Philipp Lenssen in forum Macromedia Flash
    Replies: 1
    Last Post: September 19th, 10:08 AM
  5. Viewing PSD's with Japanese characters
    By Hugo Reyes in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 0
    Last Post: July 7th, 11:46 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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139