In Java, I am generating a Unicode character file.
When I run my program in Windows (Jebus) and open the file (CSV). It displays Unicode characters (Norwegian and Icelandic) in superiority.
But when I'm deploying Red Hat Linux (in the same version, Jebus) to the same server, run the program, create and download the file, and when I look in Excel it All unicode characters are distorting. / P>
Can you please inform any local Linux setting, due to which the Unicode is being malformed? Or where change is needed?
file author authors = new FileWriter (fileName); Writer.append (new string (data .to string). GetBytes ("UTF-8"), "UTF-8"); Writer.flush (); Writer.close (); // data stringbilder type
I also have ISO8859_1
update 1
I have a system encoding Checked: Using System.getProperty ("file.encoding") found that
Windows is CP1252 and Linux is UTF-8
Update 2
When I print it used in Linux:
log.info (new string (data.string (.) GetBytes ("UTF-8"), "UTF-8" ));
All of these outputs are looking fine, but when I put it in the FileWriter extension filename.csv, it is not displaying correctly.
data string "Post-text" itemprop = "text">
data.toString ()
bytes
Data.toString () GetBytes ("UTF-8") string (data.toString (.) GetBytes ("UTF-8"), "UTF-8")
string
Code>
bytes
writer.append (new string (data.toString (.) GetBytes ("UTF-8"), "UTF-8 "));
Try only one conversion from the input encoding to a string and then type the string. Then data.toString ()
will need to know what it is reading whether it is encoding. Does data support conversion from different code pages?
Author .append (Data. Two string (codepage));
No comments:
Post a Comment