I am not able to setup cell format that contains russion characters because method public short createFormat( String format ) of java/org/apache/poi/hssf/model/Workbook.java create FormatRecord object without setUnicodeFlag and where are no methods I have found to set this flag my self. So I hacked it to be unicode always. I know this is not good - better solution is to detect whatever string can be represented in latin1 charset or not. By the way why don't do this everywhere in the project ? Patch for seting unicode flag will be attached.
Created attachment 14486 [details] setUnicodeFlag on FromatRecord I forgot to tell the version: this patch made from poi-src-2.5.1-final-20040804
Please change the patch to instead offer an API for toggling it on/off via the workbook. It is inapporpriate to force unicode for everyone.
Created attachment 14497 [details] Autodetect if we need unicoded format Here is the new patch. It detects if format string is ISO-8859-1, if it is not set unicode flag of FromatRecord to true.
Looks good. Anyone have any issues with this? I'll commit it otherwise.
*** Bug 20146 has been marked as a duplicate of this bug. ***
Applied, thanks.
*** Bug 27921 has been marked as a duplicate of this bug. ***