Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 28 Aug 2008 07:24:01 -0700,    group: microsoft.public.dotnet.framework        back       


Right to Left string Manipulation   
Description of the problem:

The context

I have to upload a file into sharepoint programmatically.
To do that i have to call “Add” function on the chosen folder or list  and 
passing as parameter the url of the file.

The problem

I have to write the url programmatically and when I mix English and Hebrew I 
don’t obtain the wanted url.

Sample:

I want to add a file named “test.docx” in the location 
http://myserver/mylist/myfolder/.
In my case I get the file name programmatically by looping into a folder in 
my local computer.

So in my code I have to write :

string filename=myFileName( sample: “test.docx”)
string UrlLocation= http://myserver/mylist/תיקייה”;
String Url=UrlLocation+filename;
myFolder.Add(Url);

The problem is that for the Url  I obtain this value : 
http://myserver/mylist/ test / תיקייה.docx  and not : http://myserver/mylist/ 
תיקייה / test.docx .
In fact the “/” character disturb the concatenation.

I have already tested : StringBuilder, Encoding, bidi32.dll without success.

Thanks for help
date: Thu, 28 Aug 2008 07:24:01 -0700   author:   mikomarseillais

RE: Right to Left string Manipulation   
Hi,

maybe you can try Path.Combine ( 
http://msdn.microsoft.com/en-us/library/system.io.path.combine.aspx ).

Vicenç

"mikomarseillais" wrote:

> Description of the problem:
> 
> The context
> 
> I have to upload a file into sharepoint programmatically.
> To do that i have to call “Add” function on the chosen folder or list  and 
> passing as parameter the url of the file.
> 
> The problem
> 
> I have to write the url programmatically and when I mix English and Hebrew I 
> don’t obtain the wanted url.
> 
> Sample:
> 
> I want to add a file named “test.docx” in the location 
> http://myserver/mylist/myfolder/.
> In my case I get the file name programmatically by looping into a folder in 
> my local computer.
> 
> So in my code I have to write :
> 
> string filename=myFileName( sample: “test.docx”)
> string UrlLocation= http://myserver/mylist/תיקייה”;
> String Url=UrlLocation+filename;
> myFolder.Add(Url);
> 
> The problem is that for the Url  I obtain this value : 
> http://myserver/mylist/ test / תיקייה.docx  and not : http://myserver/mylist/ 
> תיקייה / test.docx .
> In fact the “/” character disturb the concatenation.
> 
> I have already tested : StringBuilder, Encoding, bidi32.dll without success.
> 
> Thanks for help
date: Thu, 28 Aug 2008 07:38:01 -0700   author:   Vincent

RE: Right to Left string Manipulation   
Hi Vincent,

Thanks for your help.
I tested your idea but it doesn't work.
I found in a forum of Microsoft that there are no function in the .Net 
framework to convert between Hebrew logical and visual layouts : 
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=195951&wa=wsignin1.0

I hope there is a solution because i thinks that developpers who work with 
right to left langages have solved this problem.

All ideas are welcome.

Thanks.




"Vincent" wrote:

> Hi,
> 
> maybe you can try Path.Combine ( 
> http://msdn.microsoft.com/en-us/library/system.io.path.combine.aspx ).
> 
> Vicenç
> 
> "mikomarseillais" wrote:
> 
> > Description of the problem:
> > 
> > The context
> > 
> > I have to upload a file into sharepoint programmatically.
> > To do that i have to call “Add” function on the chosen folder or list  and 
> > passing as parameter the url of the file.
> > 
> > The problem
> > 
> > I have to write the url programmatically and when I mix English and Hebrew I 
> > don’t obtain the wanted url.
> > 
> > Sample:
> > 
> > I want to add a file named “test.docx” in the location 
> > http://myserver/mylist/myfolder/.
> > In my case I get the file name programmatically by looping into a folder in 
> > my local computer.
> > 
> > So in my code I have to write :
> > 
> > string filename=myFileName( sample: “test.docx”)
> > string UrlLocation= http://myserver/mylist/תיקייה”;
> > String Url=UrlLocation+filename;
> > myFolder.Add(Url);
> > 
> > The problem is that for the Url  I obtain this value : 
> > http://myserver/mylist/ test / תיקייה.docx  and not : http://myserver/mylist/ 
> > תיקייה / test.docx .
> > In fact the “/” character disturb the concatenation.
> > 
> > I have already tested : StringBuilder, Encoding, bidi32.dll without success.
> > 
> > Thanks for help
date: Thu, 28 Aug 2008 08:14:02 -0700   author:   mikomarseillais

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us