Greetings to everyone.
I have an issue with reading Japanese Kanji characters from CSV-file encoded in Shift-JIS, which can be uploaded through usual html-form submit or flex application.
I'm using the following code for this:
//content is an array of bytes, returned after user submits the file
ByteArrayInputStream in = new ByteArrayInputStream(content);
BufferedReader br = new BufferedReader(new InputStreamReader(in, Const.ENCODING_SHIFT_JIS));
String strLine;
try {
while (true) {
strLine = br.readLine();
//processing CSV line by line and eventually writing data to DB
...
When I'm debugging the strLine variable - I see only question marks instead of Kanji Japanese characters (in particular, I've tested it on Kanji character 裵). Other Japanese characters seems to be ok (for example 〒 character). In debug window (and later in my DB) it appears like this: 〒���
If I'm doing the same things, but have file encoding UTF-8 and Const.UTF-8 instead of Const.ENCODING_SHIFT_JIS in my code - everything works fine. But client needs Shift-JIS file encoding support.
Can anyone tell me what's the problem here?