Author:
Password:

When a character is larger than 0xffff, java's String.length cannot output it correctly in at least java6.

In the page "http://en.wikipedia.org/wiki/UTF8" which explains UTF8, there is a character "𤭢". This character is larger than 0xffff in Unicode.

Java's String.length works usuall

Tag:
Java System
UTF8
0 replys / 704 views.
Reply

As we know, there is a function in PHP called fputcsv that can transfer array into CSV line.

However, if you make a CSV file only with these CSV lines, containing UTF8 characters, the generated CSV file will became a chaos in Excel.

 

Solution example:

$fp = fopen("php://temp", 'r+');
fprintf($fp, c
Tag:
PHP
Excel
UTF8
15 replys / 3838 views.
Reply