dcsimg
<p>Uploading a CSV file with English and Japanese Characters</p>
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jagdish_Sheth
Posted On:   Friday, November 29, 2002 10:40 PM

I have CSV file which consists of a header followed by one data row. The data row consists of English as well as Japanese characters. If a open the CSV file in Excel 2000 and make some changes and save it, the Japanese characters get distorted. After this if i try to upload the file, the data row is not read fully and part of it retrived from the request object. If I add a blank space to any of the column with English characters, save the file and upload it, then the data row is retrieved properly from the request object. Given below is sample of CSV contents CRT_ID,UPLOAD,DELETE,COMPANY,PARAM,MESSAGE H94,1,0,ABC,1.0,Japanese Characters.. If i try to uploa   More>>


I have CSV file which consists of a header followed by one data row.
The data row consists of English as well as Japanese characters.
If a open the CSV file in Excel 2000 and make some changes and save it, the Japanese characters get distorted.
After this if i try to upload the file, the data row is not read fully and part of it retrived from the request object.
If I add a blank space to any of the column with English characters, save the file and upload it, then the data row is retrieved properly from the request object.
Given below is sample of CSV contents




CRT_ID,UPLOAD,DELETE,COMPANY,PARAM,MESSAGE

H94,1,0,ABC,1.0,Japanese Characters..



If i try to upload above file the 2nd row is not retrieved from the request object, but if i add a space after ABC, then the 2nd row is retrieved.
Also if the Japanese Characters are replaced with English Characters there is no problem at all in uploading

Why is this problem occuring?

   <<Less

Re: <p>Uploading a CSV file with English and Japanese Characters</p>

Posted By:   Alex_Chaffee  
Posted On:   Wednesday, December 4, 2002 05:30 PM

(a) I'm not quite sure what the exact problem is.


(b) There are way too many variables and unknowns here. Your going in and out of Excel is especially spooky. You also haven't told us how you're trying to upload it. Are you using HTTP multipart form upload? How are you parsing it? What Japanese encoding are you using? Etc.


I suggest you reduce the number of variables and try to figure out exactly what bytes are appearing where. High-bit and multibyte characters are unfortunately difficult.


Perhaps the I18N FAQ or the Servlets:Internationalization topic can help you.

About | Sitemap | Contact