Re: [dev] Long file names

2009-10-08 Thread Stephan Bergmann

On 10/05/09 03:35, tora - Takamichi Akiyama wrote:

Generally speaking, one Chinese, including most Far East Asian languages, 
characters will be
internally converted into 9 ASCII characters ( three occurrences of % followed 
by two hex-decimal
digits ) in a certain situation because of UTF-8 hex-decimal encoded URL.

If the length of text is limited up to 256 bytes somewhere, in the worst case, 
the limitation
for the number of Chinese characters might become 28, not 256. (256 / 9 = 28.4).


The limitation is on Windows pathnames, not on URLs (that are mapped to 
pathnames, by replacing sequences of escape-encoded bytes with sequences 
of pathname characters), so the ratio of human readable characters to 
pathname characters is usually much smaller than 9, typically 1--3 
(depending on the character encoding used by Windows).


-Stephan

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Long file names

2009-10-04 Thread tora - Takamichi Akiyama
Hi,

In what situation do you currently encounter the problem?
What do you do?
What do you expect?
What your OpenOffice.org actually does despite your expectations.


One possible, interesting topic:

Generally speaking, one Chinese, including most Far East Asian languages, 
characters will be
internally converted into 9 ASCII characters ( three occurrences of % followed 
by two hex-decimal
digits ) in a certain situation because of UTF-8 hex-decimal encoded URL.

If the length of text is limited up to 256 bytes somewhere, in the worst case, 
the limitation
for the number of Chinese characters might become 28, not 256. (256 / 9 = 28.4).

For example,
 Chinese characters: 中国
 Corresponding URL:  %E4%B8%AD%E5%9B%BD  (forcedly encoded)

 ASCII letters:  China
 Corresponding URL:  China  (no need to be encoded)

Tora

Wei Min Teo wrote:
 It seems that openoffice has a maximum path name of 260 chars? 
 
 However, I think the maximum path name for windows is 32,767 and file name is 
 260 in unicode. 


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Long file names

2009-10-03 Thread Andrew Douglas Pitonyak
On 09/30/2009 11:38 PM, Wei Min Teo wrote:


 Hi all,
  
 It seems that openoffice has a maximum path name of 260 chars? 

 However, I think the maximum path name for windows is 32,767 and file name is 
 260 in unicode. 

  

 Is it possible to pass in to the loadComponentFromUrl function using a 
 relative path instead of an absolute path?

 Are there any other workarounds? I can only think of making a copying to a 
 temp file, do your work and copy back. 
  
 Thanks.
   
Most of the windows API limits the maximum path to 260 chars. I have
bumped into this limit many times.

There are some unicode extensions that allow for longer path names, as
discussed here:

http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx

I have never bothered to pursue them, because although I have created
path/filename combinations that exceed this, most of the other tools
start failing in very bad ways (Windows explorer, command line tools, etc. )

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



Re: [dev] Long file names

2009-10-01 Thread Stephan Bergmann

On 10/01/09 05:38, Wei Min Teo wrote:
It seems that openoffice has a maximum path name of 260 chars? 


However, I think the maximum path name for windows is 32,767 and file name is 
260 in unicode.


Yes, see http://qa.openoffice.org/issues/show_bug.cgi?id=50885.


Is it possible to pass in to the loadComponentFromUrl function using a relative 
path instead of an absolute path?


That would not help, as under the covers of loadComponentFromUrl an 
absolute filepath is passed to the Windows API.


-Stephan

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org



[dev] Long file names

2009-09-30 Thread Wei Min Teo



Hi all,
 
It seems that openoffice has a maximum path name of 260 chars? 

However, I think the maximum path name for windows is 32,767 and file name is 
260 in unicode. 

 

Is it possible to pass in to the loadComponentFromUrl function using a relative 
path instead of an absolute path?

Are there any other workarounds? I can only think of making a copying to a temp 
file, do your work and copy back. 
 
Thanks.
 

 


Cheers,
Wei Min 
 

 







With Windows Live, you can organize, edit, and share your photos.
  
_
NEW! Get Windows Live FREE.
http://www.get.live.com/wl/all