How to read Multilanguage (English+Chinese) ASCII files?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • VidyaRJ
    New Member
    • Jul 2007
    • 2

    How to read Multilanguage (English+Chinese) ASCII files?

    Ascii files with English+Chinese has to be read and written on to a UTF8 database. The Ascii files are created on the Chinese OS.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by VidyaRJ
    Ascii files with English+Chinese has to be read and written on to a UTF8 database. The Ascii files are created on the Chinese OS.
    Correct me if I'm wrong but how can Chinese text be stored as ASCII text? Or
    do you mean that the files are UTF/8 encoded files already? If so, I don't
    understand your problem.

    kind regards,

    Jos

    Comment

    • VidyaRJ
      New Member
      • Jul 2007
      • 2

      #3
      Originally posted by JosAH
      Correct me if I'm wrong but how can Chinese text be stored as ASCII text? Or
      do you mean that the files are UTF/8 encoded files already? If so, I don't
      understand your problem.

      kind regards,

      Jos
      Hello Jos,
      Thank you for your response.

      Issue:
      One of the modules in our application (File Upload) uploades a payments file (in delimited format). This
      module is used by different countries like China, Japan, Taiwan, Singapore etc. When these countries
      upload the files from their respective OS (e.g China from a Chinese OS), since the file has both Chinese
      and English characters which are read and written on to a UTF8 Database, the customers/users are told
      to convert the file into UTF8 format and then upload. Now Customers are not comfortable with this conversion.
      (as all the clients may not have a UTF8 conversion tool).

      Now their question is, why should the file be converted to UTF8, if the file is from a Chinese/Japanese Os. (FYI the files are uploaded as .csv or .txt format). If the files are not converted to UTF8 format, the info is uploaded as garbage.

      Comment

      • praveen2gupta
        New Member
        • May 2007
        • 200

        #4
        Hi

        I tried to understand your problem. The file which your customer wants to upload should use utf-8 encoding. Since your database is in this encoding so in case of all other encoding either information will be lost or the data will be deformed or will be converted in to garbase.

        ASCII files can't support chines and Japanies characters. Now I suggest you to prepare a tool for clients by which all clients can make file in the UTF-8 encoding.

        Comment

        • emekadavid
          New Member
          • Mar 2007
          • 46

          #5
          try the Charset class encoders and decoders. If you have problems, share it after.

          Comment

          Working...