������ ������� wrote:

>Hello!
>
>First, thank you for the quick response.
>  
>
no problem man, I appreciate the help.  

>After lots of connecting I succeeded to get the current development CVS
>sources through my modem connection %).
>I have biult it, but the file creation still doesn't work properly, the
>character coding is corrupted. :(
>
>I created excel file with proper russian simbols, try to read it through the
>models and pay attention to the 16bit string in SST. So I suspected that MS
>Excel stores russian sibols as Unicode.
>I have found that  org.apache.poi.hssf.model.Workbook  has method stub:
>    public int addSSTString(String string) {
>        return addSSTString(string, false);
>    }
>I tried to change it to
>    public int addSSTString(String string) {
>        return addSSTString(string, true);
>    }
>And... it worked. :)
>But only for the SST records. The sheet name was still not encoded to
>russian properly (not Unicode, I suppose).
>  
>
So it looks like auto detection (which used to work) does not work any 
longer.  
Can you supply a patch which:
 1. allows you to add strings and define them as unicode
 2. maintains your abillity to encode in non-unicode.

If so I'll be happy to apply it.

(to patch:
0. see: http://jakarta.apache.org/site/cvsindex.html for more info, root 
setting, etc
1. check out the POI "HEAD" from CVS,
2. make your changes and do "cvs diff -u >mypatch" from the "jakarta-poi",
3. create a bug in bugzilla, make the subject start with "[PATCH]"
4. describe the patch
5. save the bug
6. go back to the bug and attach the "mypatch" file
helpful hint: cvs -z3 co jakarta-poi is much faster -- uses compression )

>Also while reading the file I saw that sheet name unicode support is absent?
>( "HSSF ����" it has read as "H S S F ", but "����" it converted to
>""5" ).
>
>
>So, is it supported to make 16bit (Unicode) every string entry of the excel
>file (inculding sheet name, etc...) ?
>
I believe so.  We don't yet support 16-bit unicode strings for sheet 
names.  If someone supplies a patch for this
I will gladly apply it.

>And did I understand correctly that addSSTString(...) method is stubbed in
>org.apache.poi.hssf.model.Workbook ?
>
yes.  the "model" package contains the low level version of 
addSSTString.  The usermodel package is but a high
level wrapper around the low level model.

>I wish I could know how Excel finds out that the String is in Russian. %)
>(may be you advise me the way of thinking?)
>  
>
Excel does it like  this (AFAIK) :  
 
 1. You have it set for Russian.  So by default it assumes you're 
writing in Russian.
 2. Upon Reading a file, there is a bit set that says "this is unicode" 
so it knows to read 16-bit unicode.

We should:

  1. Allow you to define that you wish to write in Unicode
  2. Upon reading use unicode if the unicode flag is set.

>Sincerely yours, Sergei Kozello.
>
>PS: while building the jakarta-poi-1.8.0-dev I found that
>org.apache.poi.hssf.record.TestSSTRecord has a failure. Is it OK?
>  
>
I would suppose not.  Can you provide more information?  Which test? 
 Any exception info
printed?

-andy

>
>  
>
>>Have you tried this against a recent nightly build (or CVS edition)?
>> Someone made some changes to make Japanese work.  I suspect the changes
>>would work for russian.  (Don't remember whether these made the 1.7-dev
>>release).
>>
>>If not, give it a try and let me know if it works or not.  HSSF's
>>international support is suffering from lack of international
>>contribution.  Meaning most of the contributers are American, English or
>>Austrailian with the occassional patch coming in from Germany.
>>
>>I'd like to see more Japanese, Russian, Chinese contributors.  Its very
>>difficult to add language support to a file format if you don't have a
>>version of Excel that supports that language and can't tell if its
>>correct anyhow.  (I can read a little German, but I've not the foggiest
>>clue on non Roman alphabet languages).
>>
>>Thanks,
>>
>>-Andy
>>
>>������ ������� wrote:
>>
>>    
>>
>>>Hello!
>>>
>>>I am new here, so Hi! I found the project is great. But I also found
>>>      
>>>
>trouble while working with it.
>  
>
>>>I tried to produce Excel sheets with Russian characters, but I failed to
>>>      
>>>
>do it. :(
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>  
>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

  • ... Сергей Козелло
    • ... Andrew C. Oliver
      • ... Сергей Козелло
        • ... Andrew C. Oliver
        • ... Glen Stampoultzis
          • ... Andrew C. Oliver
      • Andrew C. Oliver

Reply via email to